Skip to content

Commit

Permalink
Configure CI for new backends
Browse files Browse the repository at this point in the history
  • Loading branch information
romancardenas committed Feb 8, 2025
1 parent 46f3686 commit fd403e9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 24 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,33 @@ jobs:

- run: cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} check

# Compilation check (hifive1) TODO
# checkhifive1:
# Compilation check (hifive1)
checkhifive1:
name: check (hifive1)
runs-on: ubuntu-22.04
strategy:
matrix:
backend:
- riscv32-imac-clint
- riscv32-imac-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
run: |
rustup target add riscv32imac-unknown-none-elf
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- run: cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} check

# Clippy (lm3s6965)
clippylm3s6965:
Expand Down Expand Up @@ -155,7 +180,7 @@ jobs:
matrix:
backend:
- riscv32-imc-clint
- riscv32-imac-clint
- riscv32-imc-mecall
toolchain:
- stable
steps:
Expand All @@ -168,18 +193,12 @@ jobs:
- name: Configure Rust target
run: |
rustup target add riscv32imac-unknown-none-elf
rustup target add riscv32imc-unknown-none-elf
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2

- name: Check the examples
if: ${{ matrix.backend == 'riscv32-imc-clint' }}
run: cargo xtask --platform hifive1 --backend ${{ matrix.backend }} --exampleexclude static example-check

- name: Check the examples
if: ${{ matrix.backend != 'riscv32-imc-clint' }}
run: cargo xtask --platform hifive1 --backend ${{ matrix.backend }} example-check

# Platform esp32c3: verify all examples, checks
Expand Down Expand Up @@ -341,7 +360,7 @@ jobs:
matrix:
backend:
- riscv32-imc-clint
- riscv32-imac-clint
- riscv32-imc-mecall
toolchain:
- stable
steps:
Expand All @@ -355,7 +374,6 @@ jobs:
- name: Configure Rust target
run: |
rustup target add riscv32imac-unknown-none-elf
rustup target add riscv32imc-unknown-none-elf
- name: Add Rust component llvm-tools-preview
Expand Down Expand Up @@ -389,11 +407,6 @@ jobs:
which qemu-system-riscv32
- name: Run-pass tests
if: ${{ matrix.backend == 'riscv32-imc-clint' }}
run: cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} --exampleexclude static qemu

- name: Run-pass tests
if: ${{ matrix.backend != 'riscv32-imc-clint' }}
run: cargo xtask --deny-warnings --platform hifive1 --backend ${{ matrix.backend }} qemu

# Platform esp32c3: verify the example output with run-pass tests
Expand Down Expand Up @@ -897,7 +910,7 @@ jobs:
needs:
- formatcheck
- checklm3s6965
# checkhifive1 TODO
- checkhifive1
- clippylm3s6965
# clippyhifive1 TODO
- checkexampleslm3s6965
Expand Down
2 changes: 2 additions & 0 deletions rtic-macros/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!

## [Unreleased]

- Adapt `slic` backends to new version with `mecall`

## [v2.1.1] - 2024-12-06

### Changed
Expand Down
9 changes: 2 additions & 7 deletions xtask/src/argument_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,7 @@ impl Platforms {
let c = "-C".to_string();
match self {
Platforms::Esp32C3 => vec![c, "link-arg=-Tlinkall.x".to_string()],
Platforms::Hifive1 => vec![
c.clone(),
"link-arg=-Thifive1-link.x".to_string(),
c,
"portable_atomic_target_feature=\"zaamo\"".to_string(),
],
Platforms::Hifive1 => vec![c, "link-arg=-Thifive1-link.x".to_string()],
Platforms::Lm3s6965 => vec![c, "link-arg=-Tlink.x".to_string()],
Platforms::Nrf52840 => vec![
c.clone(),
Expand Down Expand Up @@ -315,7 +310,7 @@ impl Platforms {
_ => Err(()),
},
Platforms::Hifive1 => match backend.to_target() {
RISCV32IMC | RISCV32IMAC => Ok(None),
RISCV32IMC => Ok(None),
_ => Err(()),
},
Platforms::Lm3s6965 => match backend.to_target() {
Expand Down

0 comments on commit fd403e9

Please sign in to comment.