diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c1bc887..0a0f5ae5 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: @@ -57,7 +57,10 @@ jobs: components: clippy - run: rustup target add x86_64-unknown-linux-musl - - run: pip install cargo-zigbuild + - 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`) - run: cargo clippy --locked --all-targets --all-features -- -D warnings @@ -70,14 +73,22 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest + - 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 - - os: macos-latest + cargo_cmd: cargo + build_target: x86_64-pc-windows-msvc + - os: namespace-profile-mac-default target: aarch64-apple-darwin - - os: macos-latest + 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 @@ -102,10 +113,15 @@ 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' }} + - 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' }} # 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. @@ -128,26 +144,16 @@ jobs: - run: pnpm install - name: Build tests - run: cargo test --no-run --target ${{ matrix.target }} - if: ${{ matrix.os != 'ubuntu-latest' }} - - - name: Build tests - run: cargo-zigbuild test --no-run --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.os == 'ubuntu-latest' }} - - - name: Run tests - run: cargo test --target ${{ matrix.target }} - if: ${{ matrix.os != 'ubuntu-latest' }} + run: ${{ matrix.cargo_cmd }} test --no-run --target ${{ matrix.build_target }} - name: Run tests - run: cargo-zigbuild test --target x86_64-unknown-linux-gnu.2.17 - if: ${{ matrix.os == 'ubuntu-latest' }} + run: ${{ matrix.cargo_cmd }} test --target ${{ matrix.build_target }} 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 +199,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 +227,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)