From 9a50e5f89d2a04d7f3e101fb246a06d9b88335f9 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 30 Mar 2026 14:35:41 +0800 Subject: [PATCH 1/5] ci: migrate runner to namespace Migrate GitHub-hosted Linux/macOS runners to namespace.so runners for faster CI. Windows remains on GitHub-hosted runners. Also improve CI conditionals to use matrix.target instead of matrix.os for more robust platform checks. --- .github/workflows/ci.yml | 28 ++++++++++++++-------------- README.md | 4 ++++ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c1bc887..ffd1e176 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ defaults: jobs: detect-changes: - runs-on: ubuntu-latest + runs-on: namespace-profile-linux-x64-default permissions: contents: read pull-requests: read @@ -43,7 +43,7 @@ jobs: needs: detect-changes if: needs.detect-changes.outputs.code-changed == 'true' name: Clippy - runs-on: ubuntu-latest + runs-on: namespace-profile-linux-x64-default steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -70,13 +70,13 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - os: namespace-profile-linux-x64-default target: x86_64-unknown-linux-gnu - os: windows-latest target: x86_64-pc-windows-msvc - - os: macos-latest + - os: namespace-profile-mac-default target: aarch64-apple-darwin - - os: macos-latest + - os: namespace-profile-mac-default target: x86_64-apple-darwin runs-on: ${{ matrix.os }} steps: @@ -102,10 +102,10 @@ jobs: - run: rustup target add ${{ matrix.target }} - run: rustup target add x86_64-unknown-linux-musl - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - run: pip install cargo-zigbuild - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib # (compiled for x86_64) can be injected into node processes running under Rosetta. @@ -129,25 +129,25 @@ jobs: - name: Build tests run: cargo test --no-run --target ${{ matrix.target }} - if: ${{ matrix.os != 'ubuntu-latest' }} + if: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} - name: Build tests run: cargo-zigbuild test --no-run --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - name: Run tests run: cargo test --target ${{ matrix.target }} - if: ${{ matrix.os != 'ubuntu-latest' }} + if: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} - name: Run tests run: cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.os == 'ubuntu-latest' }} + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} test-musl: needs: detect-changes if: needs.detect-changes.outputs.code-changed == 'true' name: Test (musl) - runs-on: ubuntu-latest + runs-on: namespace-profile-linux-x64-default container: image: node:22-alpine3.21 options: --shm-size=256m # shm_io tests need bigger shared memory @@ -193,7 +193,7 @@ jobs: fmt: name: Format and Check Deps - runs-on: ubuntu-latest + runs-on: namespace-profile-linux-x64-default steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -221,7 +221,7 @@ jobs: run: pnpm dedupe --check done: - runs-on: ubuntu-latest + runs-on: namespace-profile-linux-x64-default if: always() needs: - clippy diff --git a/README.md b/README.md index a3cee071..26206b79 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ vp run -t @my/app#build # run in a package and its transitive dependencies vp run --cache build # run with caching enabled ``` +## Sponsors + +Thanks to [namespace.so](https://namespace.so) for powering our CI/CD pipelines with fast, free macOS and Linux runners. + ## License [MIT](LICENSE) From 65b0f776883d29e49103b2c19ae7335c41e77d43 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 30 Mar 2026 14:41:05 +0800 Subject: [PATCH 2/5] fix(ci): use pipx to install cargo-zigbuild on namespace runners Namespace runners use externally-managed Python (PEP 668), so `pip install` is blocked. Switch to `pipx install` which handles the virtual environment automatically. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffd1e176..6f0ca6f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: components: clippy - run: rustup target add x86_64-unknown-linux-musl - - run: pip install cargo-zigbuild + - run: pipx install cargo-zigbuild # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`) - run: cargo clippy --locked --all-targets --all-features -- -D warnings @@ -104,7 +104,7 @@ jobs: - run: rustup target add x86_64-unknown-linux-musl if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - - run: pip install cargo-zigbuild + - run: pipx install cargo-zigbuild if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib From 430935802fd63e60f1aa4a23a4de55ff478a7a48 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 30 Mar 2026 14:48:57 +0800 Subject: [PATCH 3/5] fix(ci): install zig on namespace runners for cargo-zigbuild Namespace runners don't have zig pre-installed unlike GitHub-hosted runners. Add mlugg/setup-zig to both clippy and test jobs. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f0ca6f5..b46cc0ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,7 @@ jobs: - run: rustup target add x86_64-unknown-linux-musl - run: pipx install cargo-zigbuild + - uses: mlugg/setup-zig@v2 # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`) - run: cargo clippy --locked --all-targets --all-features -- -D warnings @@ -107,6 +108,9 @@ jobs: - run: pipx install cargo-zigbuild if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + - uses: mlugg/setup-zig@v2 + if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib # (compiled for x86_64) can be injected into node processes running under Rosetta. # oxc-project/setup-node doesn't support the architecture input, so use From cc3927ffb906f1e5c8ad659a272f907e36e57a9c Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 30 Mar 2026 14:51:38 +0800 Subject: [PATCH 4/5] fix(ci): pin mlugg/setup-zig to commit hash --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b46cc0ef..d0100fab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - run: rustup target add x86_64-unknown-linux-musl - run: pipx install cargo-zigbuild - - uses: mlugg/setup-zig@v2 + - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`) - run: cargo clippy --locked --all-targets --all-features -- -D warnings @@ -108,7 +108,7 @@ jobs: - run: pipx install cargo-zigbuild if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} - - uses: mlugg/setup-zig@v2 + - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} # For x86_64-apple-darwin on arm64 runner, install x64 node so fspy preload dylib From 53ee5ac34d61f8dc0d6ba09e686bed584128ade1 Mon Sep 17 00:00:00 2001 From: MK Date: Mon, 30 Mar 2026 14:58:49 +0800 Subject: [PATCH 5/5] chore(ci): add comments explaining why setup-zig is needed alongside pipx --- .github/workflows/ci.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0100fab..0a0f5ae5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,8 @@ jobs: - run: rustup target add x86_64-unknown-linux-musl - run: pipx install cargo-zigbuild + # pipx isolates cargo-zigbuild in its own venv, so its ziglang dependency + # (which bundles zig) isn't on PATH. Install zig separately. - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 # --locked: verify Cargo.lock is up to date (replaces the removed `cargo check --locked`) @@ -73,12 +75,20 @@ jobs: include: - os: namespace-profile-linux-x64-default target: x86_64-unknown-linux-gnu + cargo_cmd: cargo-zigbuild + build_target: x86_64-unknown-linux-gnu.2.17 - os: windows-latest target: x86_64-pc-windows-msvc + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc - os: namespace-profile-mac-default target: aarch64-apple-darwin + cargo_cmd: cargo + build_target: aarch64-apple-darwin - os: namespace-profile-mac-default target: x86_64-apple-darwin + cargo_cmd: cargo + build_target: x86_64-apple-darwin runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -108,6 +118,8 @@ jobs: - run: pipx install cargo-zigbuild if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + # pipx isolates cargo-zigbuild in its own venv, so its ziglang dependency + # (which bundles zig) isn't on PATH. Install zig separately. - uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2 if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} @@ -132,20 +144,10 @@ jobs: - run: pnpm install - name: Build tests - run: cargo test --no-run --target ${{ matrix.target }} - if: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} - - - name: Build tests - run: cargo-zigbuild test --no-run --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + run: ${{ matrix.cargo_cmd }} test --no-run --target ${{ matrix.build_target }} - name: Run tests - run: cargo test --target ${{ matrix.target }} - if: ${{ matrix.target != 'x86_64-unknown-linux-gnu' }} - - - name: Run tests - run: cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} + run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} test-musl: needs: detect-changes