CI: Use backend instead of target

This commit is contained in:
Henrik Tjäder 2023-02-23 23:07:06 +01:00
parent 3087304298
commit 0fac174936

View file

@ -191,11 +191,11 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: backend:
- thumbv7m-none-eabi - thumbv7
- thumbv6m-none-eabi - thumbv6
- thumbv8m.base-none-eabi - thumbv8-base
- thumbv8m.main-none-eabi - thumbv8-main
toolchain: toolchain:
- nightly - nightly
steps: steps:
@ -206,19 +206,23 @@ jobs:
run: | run: |
rustup override set ${{ matrix.toolchain }} rustup override set ${{ matrix.toolchain }}
- name: Configure Rust target (${{ matrix.target }}) - name: Configure Rust target (v6, v7, v8.b v8.m)
run: rustup target add ${{ matrix.target }} 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 - name: Cache Dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Check the examples - name: Check the examples
if: ${{ matrix.target == 'thumbv8m.base-none-eabi' }} if: ${{ matrix.backend == 'thumbv8m-base' }}
run: cargo xtask --verbose --target ${{ matrix.target }} --exampleexclude pool example-check run: cargo xtask --verbose --backend ${{ matrix.backend }} --exampleexclude pool example-check
- name: Check the examples - name: Check the examples
if: ${{ matrix.target != 'thumbv8m.base-none-eabi' }} if: ${{ matrix.backend != 'thumbv8m-base' }}
run: cargo xtask --verbose --target ${{ matrix.target }} example-check run: cargo xtask --verbose --backend ${{ matrix.backend }} example-check
# Verify the example output with run-pass tests # Verify the example output with run-pass tests
testexamples: testexamples:
@ -226,9 +230,9 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
matrix: matrix:
target: backend:
- thumbv7m-none-eabi - thumbv7
- thumbv6m-none-eabi - thumbv6
toolchain: toolchain:
- nightly - nightly
steps: steps:
@ -240,8 +244,10 @@ jobs:
rustup set profile minimal rustup set profile minimal
rustup override set ${{ matrix.toolchain }} rustup override set ${{ matrix.toolchain }}
- name: Configure Rust target (${{ matrix.target }}) - name: Configure Rust target (v6, v7)
run: rustup target add ${{ matrix.target }} run: |
rustup target add thumbv7m-none-eabi
rustup target add thumbv6m-none-eabi
- name: Add Rust component llvm-tools-preview - name: Add Rust component llvm-tools-preview
run: rustup component add llvm-tools-preview run: rustup component add llvm-tools-preview
@ -263,7 +269,7 @@ jobs:
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs
- name: Run-pass tests - name: Run-pass tests
run: cargo xtask --verbose --target ${{ matrix.target }} qemu run: cargo xtask --verbose --backend ${{ matrix.backend }} qemu
# Run test suite # Run test suite
testsrtic: testsrtic: