diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-04-16 19:19:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-16 19:19:09 +0000 |
| commit | 55083fb3ccee36c623c91b48ecc7d1f563ed80f8 (patch) | |
| tree | b2166e9a5f93646f7123e2eb323331bf9a4b2fa2 /.github | |
| parent | 56bf829931cd3f8267ad435f6ff8f3ae200418b4 (diff) | |
| parent | b7e4498a7136041d89541bdc7725c8c023fa5c9c (diff) | |
Merge #736
736: More `xtasks` and add examples to `rtic` repo r=korken89 a=datdenkikniet
This was in #732 before, but decluttering that PR seemed sensible
Co-authored-by: datdenkikniet <jcdra1@gmail.com>
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 53 |
1 files changed, 33 insertions, 20 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f2bec7d..ad0f5ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,9 +25,6 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Fail on warnings - run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - - name: Cache Dependencies uses: Swatinem/rust-cache@v2 @@ -62,13 +59,10 @@ jobs: rustup target add thumbv8m.base-none-eabi rustup target add thumbv8m.main-none-eabi - - name: Fail on warnings - run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - run: cargo xtask --backend ${{ matrix.backend }} check + - run: cargo xtask --deny-warnings --backend ${{ matrix.backend }} check # Clippy clippy: @@ -101,13 +95,10 @@ jobs: - name: Add Rust component clippy run: rustup component add clippy - - name: Fail on warnings - run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - run: cargo xtask --backend ${{ matrix.backend }} clippy + - run: cargo xtask --deny-warnings --backend ${{ matrix.backend }} clippy # Verify all examples, checks checkexamples: @@ -148,6 +139,35 @@ jobs: if: ${{ matrix.backend != 'thumbv8-base' }} run: cargo xtask --backend ${{ matrix.backend }} example-check + # Check that the usage examples build + usageexamples: + name: Build usage examples + runs-on: ubuntu-22.04 + strategy: + matrix: + toolchain: + - nightly + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install rust ${{ matrix.toolchain }} + run: | + rustup set profile minimal + rustup override set ${{ matrix.toolchain }} + + - name: Configure rust target (v6, v7) + run: | + rustup target add thumbv7m-none-eabi + rustup target add thumbv6m-none-eabi + rustup component add rust-src + + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + + - name: Check the examples + run: cargo xtask usage-example-build + # Verify the example output with run-pass tests testexamples: name: QEMU run @@ -190,12 +210,8 @@ jobs: sudo apt update sudo apt install -y qemu-system-arm - - name: Fail on warnings - working-directory: ./rtic - run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs - - name: Run-pass tests - run: cargo xtask --backend ${{ matrix.backend }} qemu + run: cargo xtask --deny-warnings --backend ${{ matrix.backend }} qemu # Run test suite tests: @@ -231,11 +247,8 @@ jobs: rustup target add thumbv8m.base-none-eabi rustup target add thumbv8m.main-none-eabi - - name: Fail on warnings - run: find . -type f -name lib.rs -execdir sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' {} + - - name: Run cargo test - run: cargo xtask --backend ${{ matrix.backend }} test ${{ matrix.package }} + run: cargo xtask --deny-warnings --backend ${{ matrix.backend }} test ${{ matrix.package }} # Build documentation, check links docs: |
