Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Create empty worker build artifacts
- run: mkdir -p worker/build/worker
- run: touch worker/build/worker/shim.mjs
Expand All @@ -41,15 +42,26 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- uses: actions/setup-node@v6
with:
node-version: 22

# TODO(augustoccesar)[2026-05-04]: From 0.7.0, the worker-build version is aligned
# with the version of the worker crate. When bumping the worker, it needs to also
# bump the worker-build.
- name: Pre-build Worker
working-directory: worker
run: |
rustup target add wasm32-unknown-unknown
cargo install -q worker-build@0.1.4
worker-build --release

- name: Start Wrangler Worker
working-directory: worker
run: |
cp wrangler.toml.sample wrangler.toml
cp wrangler.ci.toml wrangler.toml
npm install -g wrangler@latest
nohup npx wrangler@latest dev > wrangler.log 2>&1 &
tail -f wrangler.log | while read LOGLINE
Expand All @@ -66,6 +78,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-targets: "false"
# TODO(augustoccesar)[2026-02-25]: From 0.7.0, the worker-build version is aligned
# with the version of the worker crate. When bumping the worker, it needs to also
# bump the worker-build.
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ jobs:
rustup target add ${{ matrix.target }}
rustup show

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-on-failure: true

- name: Build
run: cargo build --release --manifest-path linkup-cli/Cargo.toml --target ${{ matrix.target }}

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ jobs:
rustup target add ${{ matrix.target }}
rustup show

- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-on-failure: true

- name: Build
run: cargo build --release --manifest-path linkup-cli/Cargo.toml --target ${{ matrix.target }}

Expand Down
19 changes: 19 additions & 0 deletions worker/wrangler.ci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "linkup-worker"
main = "build/worker/shim.mjs"
compatibility_date = "2024-05-30"

kv_namespaces = [
{ binding = "LINKUP_SESSIONS", id = "xxx_sessions" },
{ binding = "LINKUP_TUNNELS", id = "xxx_tunnels" },
]

[vars]
CLOUDFLARE_ACCOUNT_ID = ""
CLOUDFLARE_TUNNEL_ZONE_ID = ""
CLOUDLFLARE_ALL_ZONE_IDS = ""
CLOUDFLARE_API_TOKEN = ""
TUNNEL_NAME_PREFIX = "linkup-tunnel-wrangler-"
WORKER_TOKEN = "token123"

[triggers]
crons = [ "0 12 * * 2-6" ]
Loading