From d82b55516e735fa06f50a6c34f4080adc4cefda7 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Wed, 15 Jan 2025 10:45:25 +0100 Subject: [PATCH 1/3] split 2d and 3d tests to see if CI can gain time --- .github/workflows/main.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f966b503..d6aa44aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,6 +37,9 @@ jobs: runs-on: ubuntu-latest env: RUSTFLAGS: -D warnings + strategy: + matrix: + dim: [2, 3] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -46,18 +49,15 @@ jobs: with: prefix-key: ${{ env.RUST_CACHE_KEY }} - run: sudo apt update && sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev - - name: Clippy for bevy_rapier2d - run: cargo clippy --verbose -p bevy_rapier2d - - name: Clippy for bevy_rapier3d - run: cargo clippy --verbose -p bevy_rapier3d - - name: Clippy for bevy_rapier2d (debug-render, simd, serde) - run: cargo clippy --verbose -p bevy_rapier2d --features debug-render-2d,simd-stable,serde-serialize - - name: Clippy for bevy_rapier3d (debug-render, simd, serde) - run: cargo clippy --verbose -p bevy_rapier3d --features debug-render-3d,simd-stable,serde-serialize - - name: Test for bevy_rapier2d - run: cargo test --verbose -p bevy_rapier2d - - name: Test for bevy_rapier3d - run: cargo test --verbose -p bevy_rapier3d + - name: Clippy for bevy_rapier${{ matrix.dim }}d + run: cargo clippy --verbose -p bevy_rapier${{ matrix.dim }}d + - name: Clippy for bevy_rapier${{ matrix.dim }}d (debug-render, simd, serde) + run: cargo clippy --verbose -p bevy_rapier${{ matrix.dim }}d --features debug-render-${{ matrix.dim }}d,simd-stable,serde-serialize + - name: Test for bevy_rapier${{ matrix.dim }}d + run: cargo test --verbose -p bevy_rapier${{ matrix.dim }}d + - name: Unit Tests for bevy_rapier{{ matrix.dim }}d without default features + # cargo test by default also tests examples, which most need the debug render feature, so we pass `--lib` to only test the library + run: cargo test -p bevy_rapier{{ matrix.dim }}d --no-default-features --features dim{{ matrix.dim }} --lib test-wasm: runs-on: ubuntu-latest env: From 447adea62aa1843256419c1c8fd59222522f4129 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 28 Feb 2025 14:19:30 +0100 Subject: [PATCH 2/3] fix ci --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ccead74..4f3840ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,9 +56,9 @@ jobs: run: cargo clippy --verbose -p bevy_rapier${{ matrix.dim }}d --features debug-render-${{ matrix.dim }}d,simd-stable,serde-serialize - name: Test for bevy_rapier${{ matrix.dim }}d run: cargo test --verbose -p bevy_rapier${{ matrix.dim }}d - - name: Unit Tests for bevy_rapier{{ matrix.dim }}d without default features + - name: Unit Tests for bevy_rapier${{ matrix.dim }}d without default features # cargo test by default also tests examples, which most need the debug render feature, so we pass `--lib` to only test the library - run: cargo test -p bevy_rapier{{ matrix.dim }}d --no-default-features --features dim{{ matrix.dim }} --lib + run: cargo test -p bevy_rapier${{ matrix.dim }}d --no-default-features --features dim${{ matrix.dim }} --lib test-no-ambiguity: runs-on: ubuntu-latest env: From 0123272751ff9c517a36cb13720256d6c572eb36 Mon Sep 17 00:00:00 2001 From: Thierry Berger Date: Fri, 28 Feb 2025 14:40:23 +0100 Subject: [PATCH 3/3] install dependencies in new ci steps --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4f3840ed..ff892aeb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,6 +69,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: prefix-key: ${{ env.RUST_CACHE_KEY }} + - run: sudo apt update && sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev - name: Test for no conflicting system order ambiguity run: cargo run --bin ambiguity_detection test-all-features: @@ -81,6 +82,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: prefix-key: ${{ env.RUST_CACHE_KEY }} + - run: sudo apt update && sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev - run: cargo install cargo-all-features - name: Check all features individually run: cargo check-all-features