From bacdb7da597c22670ec92dca1756f27a48fdec7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Fri, 24 Feb 2023 01:54:22 +0100 Subject: CI: Basic tests rework --- .github/workflows/build.yml | 27 +++++++++++++++++++++------ rtic/tests/tests.rs | 7 ------- rtic/tests/ui.rs | 7 +++++++ 3 files changed, 28 insertions(+), 13 deletions(-) delete mode 100644 rtic/tests/tests.rs create mode 100644 rtic/tests/ui.rs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6deecb2..5687063 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -68,6 +68,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: + backend: - thumbv7 - thumbv6 - thumbv8-base @@ -132,11 +133,11 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Check the examples - if: ${{ matrix.backend == 'thumbv8m-base' }} + if: ${{ matrix.backend == 'thumbv8-base' }} run: cargo xtask --verbose --backend ${{ matrix.backend }} --exampleexclude pool example-check - name: Check the examples - if: ${{ matrix.backend != 'thumbv8m-base' }} + if: ${{ matrix.backend != 'thumbv8-base' }} run: cargo xtask --verbose --backend ${{ matrix.backend }} example-check # Verify the example output with run-pass tests @@ -190,6 +191,14 @@ jobs: testsrtic: name: tests rtic runs-on: ubuntu-22.04 + strategy: + matrix: + backend: + - thumbv7 + - thumbv6 + - thumbv8-base + - thumbv8-main + steps: - name: Checkout uses: actions/checkout@v3 @@ -203,12 +212,18 @@ jobs: - name: Run cargo test working-directory: ./rtic - run: cargo test --test tests + run: cargo test --features ${{ matrix.backend }} --test ui - # Run the macros test-suite + # Run the macros test-suite testsmacros: name: tests rtic-macros runs-on: ubuntu-22.04 + strategy: + matrix: + backend: + - cortex-m-source-masking + - cortex-m-basepri + steps: - name: Checkout uses: actions/checkout@v3 @@ -222,7 +237,7 @@ jobs: - name: cargo check working-directory: ./rtic-macros - run: cargo test + run: cargo test --features ${{ matrix.backend }} # Run test suite testsarbiter: @@ -298,7 +313,7 @@ jobs: - name: Run cargo test working-directory: ./rtic-time - run: cargo test --test tests + run: cargo test # Build documentation, check links docs: diff --git a/rtic/tests/tests.rs b/rtic/tests/tests.rs deleted file mode 100644 index 9fb88a1..0000000 --- a/rtic/tests/tests.rs +++ /dev/null @@ -1,7 +0,0 @@ -use trybuild::TestCases; - -#[test] -fn ui() { - let t = TestCases::new(); - t.compile_fail("ui/*.rs"); -} diff --git a/rtic/tests/ui.rs b/rtic/tests/ui.rs new file mode 100644 index 0000000..9fb88a1 --- /dev/null +++ b/rtic/tests/ui.rs @@ -0,0 +1,7 @@ +use trybuild::TestCases; + +#[test] +fn ui() { + let t = TestCases::new(); + t.compile_fail("ui/*.rs"); +} -- cgit v1.2.3