aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml127
1 files changed, 44 insertions, 83 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 94fbd3f..acc6ce3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -108,102 +108,65 @@ jobs:
# Clippy (hifive1) TODO
# clippyhifive1:
- # Platform lm3s6965: verify all examples, checks
- checkexampleslm3s6965:
- name: check examples (lm3s6965)
+ # Verify all examples, checks
+ checkexamples:
+ name: check examples
runs-on: ubuntu-22.04
strategy:
matrix:
- backend:
- - thumbv7
- - thumbv6
- - thumbv8-base
- - thumbv8-main
- toolchain:
- - stable
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Install Rust ${{ matrix.toolchain }}
- run: |
- rustup override set ${{ matrix.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
+ input:
+ - backend: thumbv7
+ platform: lm3s6965
+ rustup-target: thumbv7m-none-eabi
+
+ - backend: thumbv6
+ 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
- - 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: Install optional custom toolchain
+ if: matrix.input.custom-toolchain
+ run: ${{ matrix.input.custom-toolchain }}
- name: Configure Rust target
- run: |
- rustup target add riscv32imc-unknown-none-elf
+ run: rustup target add ${{ matrix.input.rustup-target }}
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
-
- - name: Check the examples
- run: cargo xtask --platform hifive1 --backend ${{ matrix.backend }} 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
- 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 }} --exampleexclude pool example-check
+ - name: Check the examples
+ if: ${{ matrix.input.backend != 'thumbv8-base' }}
+ run: cargo xtask --platform ${{ matrix.input.platform }} --backend ${{ matrix.input.backend }} example-check
buildqemu:
name: Get modern QEMU, build and store
@@ -888,9 +851,7 @@ jobs:
# - checkhifive1 # TODO
- clippylm3s6965
# - clippyhifive1 # TODO
- - checkexampleslm3s6965
- - checkexampleshifive1
- - checkexamplesesp32c3
+ - checkexamples
- testexampleslm3s6965
- testexampleshifive1
- testexamplesesp32c3