mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 05:45:19 +01:00
ci: checkexamples can use the same template
This commit is contained in:
parent
2c63a09cc4
commit
9d2b359db5
1 changed files with 45 additions and 84 deletions
129
.github/workflows/build.yml
vendored
129
.github/workflows/build.yml
vendored
|
|
@ -108,102 +108,65 @@ jobs:
|
||||||
# Clippy (hifive1) TODO
|
# Clippy (hifive1) TODO
|
||||||
# clippyhifive1:
|
# clippyhifive1:
|
||||||
|
|
||||||
# Platform lm3s6965: verify all examples, checks
|
# Verify all examples, checks
|
||||||
checkexampleslm3s6965:
|
checkexamples:
|
||||||
name: check examples (lm3s6965)
|
name: check examples
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
backend:
|
input:
|
||||||
- thumbv7
|
- backend: thumbv7
|
||||||
- thumbv6
|
platform: lm3s6965
|
||||||
- thumbv8-base
|
rustup-target: thumbv7m-none-eabi
|
||||||
- thumbv8-main
|
|
||||||
toolchain:
|
- backend: thumbv6
|
||||||
- stable
|
platform: lm3s6965
|
||||||
|
rustup-target: thumbv6m-none-eabi
|
||||||
|
|
||||||
|
- backend: thumbv8-base
|
||||||
|
platform: lm3s6965
|
||||||
|
rustup-target: thumbv8m.base-none-eabi
|
||||||
|
|
||||||
|
- backend: thumbv8-main
|
||||||
|
platform: lm3s6965
|
||||||
|
rustup-target: thumbv8m.main-none-eabi
|
||||||
|
|
||||||
|
- backend: riscv32-imc-clint
|
||||||
|
platform: hifive1
|
||||||
|
rustup-target: riscv32imc-unknown-none-elf
|
||||||
|
custom-toolchain: rustup toolchain install nightly-2023-11-14 --component rust-src --target riscv32imc-unknown-none-elf && rustup override set nightly
|
||||||
|
|
||||||
|
- backend: riscv32-imc-mecall
|
||||||
|
platform: hifive1
|
||||||
|
rustup-target: riscv32imc-unknown-none-elf
|
||||||
|
custom-toolchain: rustup toolchain install nightly-2023-11-14 --component rust-src --target riscv32imc-unknown-none-elf && rustup override set nightly
|
||||||
|
|
||||||
|
- backend: riscv-esp32-c3
|
||||||
|
platform: esp32-c3
|
||||||
|
rustup-target: riscv32imc-unknown-none-elf
|
||||||
|
custom-toolchain: rustup toolchain install nightly-2023-11-14 --component rust-src --target riscv32imc-unknown-none-elf && rustup override set nightly
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }}
|
- name: Install optional custom toolchain
|
||||||
run: |
|
if: matrix.input.custom-toolchain
|
||||||
rustup override set ${{ matrix.toolchain }}
|
run: ${{ matrix.input.custom-toolchain }}
|
||||||
|
|
||||||
- name: Configure Rust target (v6, v7, v8.b v8.m)
|
|
||||||
run: |
|
|
||||||
rustup target add thumbv7m-none-eabi
|
|
||||||
rustup target add thumbv6m-none-eabi
|
|
||||||
rustup target add thumbv8m.base-none-eabi
|
|
||||||
rustup target add thumbv8m.main-none-eabi
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Check the examples
|
|
||||||
if: ${{ matrix.backend == 'thumbv8-base' }}
|
|
||||||
run: cargo xtask --platform lm3s6965 --backend ${{ matrix.backend }} --exampleexclude pool example-check
|
|
||||||
|
|
||||||
- name: Check the examples
|
|
||||||
if: ${{ matrix.backend != 'thumbv8-base' }}
|
|
||||||
run: cargo xtask --platform lm3s6965 --backend ${{ matrix.backend }} example-check
|
|
||||||
|
|
||||||
# Platform hifive1: verify all examples, checks
|
|
||||||
checkexampleshifive1:
|
|
||||||
name: check examples (hifive1)
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
backend:
|
|
||||||
- riscv32-imc-clint
|
|
||||||
- riscv32-imc-mecall
|
|
||||||
toolchain:
|
|
||||||
- stable
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }}
|
|
||||||
run: |
|
|
||||||
rustup override set ${{ matrix.toolchain }}
|
|
||||||
|
|
||||||
- name: Configure Rust target
|
- name: Configure Rust target
|
||||||
run: |
|
run: rustup target add ${{ matrix.input.rustup-target }}
|
||||||
rustup target add riscv32imc-unknown-none-elf
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check the examples
|
- name: Check the examples
|
||||||
run: cargo xtask --platform hifive1 --backend ${{ matrix.backend }} example-check
|
if: ${{ matrix.input.backend == 'thumbv8-base' }}
|
||||||
|
run: cargo xtask --platform ${{ matrix.input.platform }} --backend ${{ matrix.input.backend }} --exampleexclude pool example-check
|
||||||
|
|
||||||
# Platform esp32c3: verify all examples, checks
|
|
||||||
checkexamplesesp32c3:
|
|
||||||
name: check examples (esp32c3)
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
backend:
|
|
||||||
- riscv-esp32-c3
|
|
||||||
toolchain:
|
|
||||||
- nightly
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust ${{ matrix.toolchain }}
|
|
||||||
run: |
|
|
||||||
rustup toolchain install nightly-2023-11-14 --component rust-src --target riscv32imc-unknown-none-elf
|
|
||||||
|
|
||||||
- name: Configure Rust target
|
|
||||||
run: |
|
|
||||||
rustup target add riscv32imc-unknown-none-elf
|
|
||||||
|
|
||||||
- name: Cache Dependencies
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
|
|
||||||
- name: Check the examples
|
- name: Check the examples
|
||||||
run: cargo xtask --platform esp32-c3 --backend ${{ matrix.backend }} example-check
|
if: ${{ matrix.input.backend != 'thumbv8-base' }}
|
||||||
|
run: cargo xtask --platform ${{ matrix.input.platform }} --backend ${{ matrix.input.backend }} example-check
|
||||||
|
|
||||||
buildqemu:
|
buildqemu:
|
||||||
name: Get modern QEMU, build and store
|
name: Get modern QEMU, build and store
|
||||||
|
|
@ -888,9 +851,7 @@ jobs:
|
||||||
# - checkhifive1 # TODO
|
# - checkhifive1 # TODO
|
||||||
- clippylm3s6965
|
- clippylm3s6965
|
||||||
# - clippyhifive1 # TODO
|
# - clippyhifive1 # TODO
|
||||||
- checkexampleslm3s6965
|
- checkexamples
|
||||||
- checkexampleshifive1
|
|
||||||
- checkexamplesesp32c3
|
|
||||||
- testexampleslm3s6965
|
- testexampleslm3s6965
|
||||||
- testexampleshifive1
|
- testexampleshifive1
|
||||||
- testexamplesesp32c3
|
- testexamplesesp32c3
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue