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
54 changes: 30 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading