Lightweight coding agent that runs in your terminal
Rust
fix: skip `cargo test` for release builds on ordinary CI because it is slow, particularly with --all-features set (#2276)
Michael Bolin3a0656df63f2
diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.ymlindex 0fd67175a9..735a187a78 100644--- a/.github/workflows/rust-ci.yml+++ b/.github/workflows/rust-ci.yml@@ -53,15 +53,9 @@ jobs:- runner: macos-14target: x86_64-apple-darwinprofile: dev- - runner: macos-14- target: aarch64-apple-darwin- profile: release- runner: ubuntu-24.04target: x86_64-unknown-linux-muslprofile: dev- - runner: ubuntu-24.04- target: x86_64-unknown-linux-musl- profile: release- runner: ubuntu-24.04target: x86_64-unknown-linux-gnuprofile: dev@@ -75,6 +69,15 @@ jobs:target: x86_64-pc-windows-msvcprofile: dev+ # Also run representative release builds on Mac and Linux because+ # there could be release-only build errors we want to catch.+ - runner: macos-14+ target: aarch64-apple-darwin+ profile: release+ - runner: ubuntu-24.04+ target: x86_64-unknown-linux-musl+ profile: release+steps:- uses: actions/checkout@v4- uses: dtolnay/[email protected]@@ -108,12 +111,14 @@ jobs:# slower, we only do this for the x86_64-unknown-linux-gnu target.- name: cargo build individual cratesid: build- if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}+ if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' && matrix.profile != 'release' }}continue-on-error: truerun: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build --profile ${{ matrix.profile }}'- name: cargo testid: test+ # `cargo test` takes too long for release builds to run them on every PR+ if: ${{ matrix.profile != 'release' }}continue-on-error: truerun: cargo test --all-features --target ${{ matrix.target }} --profile ${{ matrix.profile }}env: