|
26 | 26 | # Compiler warnings should fail to compile |
27 | 27 | EXTRA_CARGO_CONFIG: "target.'cfg(all())'.rustflags = [\"-Dwarnings\"]" |
28 | 28 |
|
| 29 | + # Nextest version |
| 30 | + NEXTEST_VERSION: 0.9.114 |
| 31 | + CACHE_BUSTER: f7c64774f37c |
| 32 | + |
29 | 33 | steps: |
| 34 | + - name: Restore cargo-nextest binary |
| 35 | + uses: actions/cache/restore@v3 |
| 36 | + id: nextest_bin_restore |
| 37 | + with: |
| 38 | + path: ~/.cargo/bin/cargo-nextest |
| 39 | + key: nextest-bin-${{ env.NEXTEST_VERSION}}-${{ env.CACHE_BUSTER }} |
| 40 | + |
| 41 | + - name: Install cargo-nextest |
| 42 | + if: steps.nextest_bin_restore.outputs.cache-hit != 'true' |
| 43 | + run: | |
| 44 | + cargo install cargo-nextest --version ${NEXTEST_VERSION} --locked --no-default-features --features=default-no-update |
| 45 | +
|
| 46 | + - name: Save cargo-nextest binary |
| 47 | + uses: actions/cache/save@v3 |
| 48 | + if: steps.nextest_bin_restore.outputs.cache-hit != 'true' |
| 49 | + with: |
| 50 | + path: ~/.cargo/bin/cargo-nextest |
| 51 | + key: ${{ steps.nextest_bin_restore.outputs.cache-primary-key }} |
| 52 | + |
30 | 53 | - name: Checkout repo |
31 | 54 | uses: actions/checkout@v3 |
32 | 55 |
|
@@ -127,16 +150,24 @@ jobs: |
127 | 150 | popd; \ |
128 | 151 | done |
129 | 152 |
|
| 153 | + - name: Build test firmware |
| 154 | + run: | |
| 155 | + rustup target add riscv32imc-unknown-none-elf |
| 156 | + sudo apt-get install gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf |
| 157 | + mkdir /tmp/caliptra-test-firmware |
| 158 | + cargo run -p caliptra-builder -- --all_elfs /tmp/caliptra-test-firmware |
| 159 | +
|
130 | 160 | - name: Run tests |
131 | 161 | run: | |
132 | | - CPTRA_COVERAGE_PATH=/tmp cargo --config "$EXTRA_CARGO_CONFIG" test --locked |
| 162 | + export CALIPTRA_PREBUILT_FW_DIR=/tmp/caliptra-test-firmware |
| 163 | +
|
| 164 | + CPTRA_COVERAGE_PATH=/tmp cargo --config "$EXTRA_CARGO_CONFIG" nextest run --locked --no-fail-fast |
133 | 165 | CPTRA_COVERAGE_PATH=/tmp cargo --config "$EXTRA_CARGO_CONFIG" run --manifest-path ./coverage/Cargo.toml |
134 | 166 |
|
135 | | - CARGO_TARGET_DIR=target cargo --config "$EXTRA_CARGO_CONFIG" test --locked --manifest-path ci-tools/fpga-boss/Cargo.toml |
| 167 | + CARGO_TARGET_DIR=target cargo --config "$EXTRA_CARGO_CONFIG" nextest run --locked --no-fail-fast --manifest-path ci-tools/fpga-boss/Cargo.toml |
136 | 168 |
|
137 | 169 | - name: Run emulator conformance tests |
138 | 170 | run: | |
139 | | - sudo apt-get install gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf |
140 | 171 | (cd /tmp/ && git clone --depth 1 --branch old-framework-2.x https://github.com/riscv-non-isa/riscv-arch-test) |
141 | 172 | cargo --config "$EXTRA_CARGO_CONFIG" run --locked -p compliance-test -- --test_root_path /tmp/riscv-arch-test |
142 | 173 |
|
|
0 commit comments