From 75ca5696998758825476532268ac24f6d90c1dad Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sat, 22 Mar 2025 22:31:06 +0100 Subject: [PATCH] ci: Check at least one C3 target --- .github/workflows/build.yml | 5 ++++- xtask/src/argument_parsing.rs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8acc94e467f..68867d0cd4c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,6 @@ jobs: run: cargo xtask --verbose fmt -c # Compilation check - # TODO: check esp32-c3 check: name: check runs-on: ubuntu-22.04 @@ -64,6 +63,10 @@ jobs: - backend: riscv32-imc-mecall platform: hifive1 rustup-target: riscv32imc-unknown-none-elf + + - backend: riscv-esp32-c3 + platform: esp32-c3 + rustup-target: riscv32imc-unknown-none-elf steps: - name: Checkout uses: actions/checkout@v4 diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 47c53a0468c..a9af1702784 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -138,7 +138,7 @@ impl TestMetadata { } } -#[derive(clap::ValueEnum, Copy, Clone, Default, Debug)] +#[derive(clap::ValueEnum, Copy, Clone, Default, Debug, PartialEq)] pub enum Backends { Thumbv6, #[default] @@ -193,7 +193,9 @@ impl Backends { #[allow(clippy::wrong_self_convention)] pub fn to_rtic_monotonics_features(&self, partial: bool) -> Option<&[&str]> { - if !self.is_arm() { + if self == &Self::RiscvEsp32C3 { + Some(&["esp32c3-systimer"]) + } else if !self.is_arm() { None } else if partial { Some(&[