aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2023-04-15 19:40:21 +0200
committerdatdenkikniet <jcdra1@gmail.com>2023-04-16 13:08:46 +0200
commiteac593e300832c3f7b0440134a8a3e810dd08ee3 (patch)
treea10ba86bbdd7a54e9758c7d4f58fc4d15caaff86 /.github/workflows
parent63b7024cb98717dd785ae888f419002b9835c6b1 (diff)
Check usage examples in CI
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f2bec7d..4fa2b80 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -148,6 +148,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