diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index d8e3191be..be3ee0e67 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 @@ -52,7 +59,7 @@ jobs: - name: Install cargo make run: | - cargo install --force cargo-make + cargo install cargo-make || echo "cargo-make already installed" - name: Check code format uses: actions-rs/cargo@v1 with: @@ -61,6 +68,8 @@ jobs: - name: Run clippy uses: actions-rs/cargo@v1 + env: + TARGET: ${{ matrix.target }} with: command: make args: clippy-check-selected-packages diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a504bcec5..a1a6b5aba 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 @@ -46,9 +54,11 @@ jobs: - name: Install cargo make run: | - cargo install --force cargo-make + cargo install cargo-make || echo "cargo-make already installed" - name: run test uses: actions-rs/cargo@v1 + env: + TARGET: ${{ matrix.target }} with: command: make args: tests \ No newline at end of file diff --git a/Makefile.toml b/Makefile.toml index 697408595..60864bade 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"] +args = ["test", "--lib", "--release", "--target", "${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", "${TARGET}", "--", "-D", "warnings"]