From 361e8524795c3bbb8d9faae452ad09e0d8a2cf32 Mon Sep 17 00:00:00 2001 From: "sm.wu" Date: Fri, 6 Sep 2024 11:59:28 +0800 Subject: [PATCH] test ci skip riscv32im target --- .github/workflows/lints.yml | 9 +++++++++ .github/workflows/tests.yml | 10 ++++++++++ Makefile.toml | 4 ++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index d8e3191be..bf3e1455a 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -33,6 +33,13 @@ jobs: timeout-minutes: 30 runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64-unknown-linux-gnu, riscv32im-unknown-none-elf] + # Exclude the riscv32im-unknown-none-elf target + exclude: + - target: riscv32im-unknown-none-elf + steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -61,6 +68,8 @@ jobs: - name: Run clippy uses: actions-rs/cargo@v1 + env: + TAEGET: ${{ matrix.target }} with: command: make args: clippy-check-selected-packages diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a504bcec5..ab68b9bb2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,6 +31,14 @@ jobs: name: Run Tests timeout-minutes: 30 runs-on: ubuntu-latest + + strategy: + matrix: + target: [x86_64-unknown-linux-gnu, riscv32im-unknown-none-elf] + # Exclude the riscv32im-unknown-none-elf target + exclude: + - target: riscv32im-unknown-none-elf + steps: - uses: actions/checkout@v2 - name: Cargo cache @@ -49,6 +57,8 @@ jobs: cargo install --force cargo-make - name: run test uses: actions-rs/cargo@v1 + env: + TAEGET: ${{ matrix.target }} with: command: make args: tests \ No newline at end of file diff --git a/Makefile.toml b/Makefile.toml index 9aac8c676..6f3c7c436 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -5,7 +5,7 @@ RAYON_NUM_THREADS = "${CORE}" [tasks.tests] command = "cargo" -args = ["test", "--lib", "--release", "--workspace", "--exclude", "singer-pro", "--exclude", "ceno_rt"] +args = ["test", "--lib", "--release", "--target", "${CARGO_MAKE_ENV_TARGET}", "--workspace", "--exclude", "singer-pro", "--exclude", "ceno_rt"] [tasks.fmt-check] command = "cargo" @@ -25,4 +25,4 @@ args = ["fmt", "-p", "ceno_zkvm", "--", "--check"] [tasks.clippy-check-selected-packages] command = "cargo" -args = ["clippy", "-p", "ceno_zkvm", "--", "-D", "warnings"] +args = ["clippy", "-p", "ceno_zkvm", "--target", "${CARGO_MAKE_ENV_TARGET}", "--", "-D", "warnings"]