|
49 | 49 | key: custom-out-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/litebox_syscall_rewriter/**/*.rs') }} |
50 | 50 | - run: ./.github/tools/github_actions_run_cargo fmt |
51 | 51 | - run: | |
52 | | - ./.github/tools/github_actions_run_cargo clippy --all-targets --all-features --workspace --exclude litebox_platform_lvbs --exclude litebox_runner_lvbs --exclude litebox_runner_optee_on_linux_userland --exclude litebox_runner_snp |
| 52 | + ./.github/tools/github_actions_run_cargo clippy --all-targets --all-features --workspace --exclude litebox_platform_lvbs --exclude litebox_runner_lvbs --exclude litebox_runner_optee_on_linux_userland --exclude litebox_runner_snp --exclude litebox_platform --exclude litebox_runner_optee_on_machine |
53 | 53 | ./.github/tools/github_actions_run_cargo clippy --all-targets --all-features -p litebox_runner_optee_on_linux_userland |
54 | 54 | # We exclude `litebox_platform_lvbs` and `litebox_runner_lvbs` because we cannot build them with a stable toolchain. |
55 | 55 | # They depend on the unstable `abi_x86_interrupt` feature. `build_and_test_nightly` cover them. |
|
67 | 67 | # aren't included in nextest at the moment. See relevant discussion at |
68 | 68 | # https://github.com/nextest-rs/nextest/issues/16 |
69 | 69 | - name: Build documentation (fail on warnings) |
70 | | - run: ./.github/tools/github_actions_run_cargo doc --no-deps --all-features --document-private-items --workspace --exclude litebox_platform_lvbs --exclude litebox_runner_lvbs --exclude litebox_runner_snp |
| 70 | + run: ./.github/tools/github_actions_run_cargo doc --no-deps --all-features --document-private-items --workspace --exclude litebox_platform_lvbs --exclude litebox_runner_lvbs --exclude litebox_runner_snp --exclude litebox_platform --exclude litebox_runner_optee_on_machine |
71 | 71 |
|
72 | 72 | build_and_test_32bit: |
73 | 73 | name: Build and Test (32-bit) |
@@ -194,6 +194,36 @@ jobs: |
194 | 194 | - name: Build documentation (fail on warnings) |
195 | 195 | run: ./.github/tools/github_actions_run_cargo doc --no-deps --all-features --document-private-items |
196 | 196 |
|
| 197 | + build_and_test_qemu: |
| 198 | + name: Build and Test boot image with QEMU |
| 199 | + runs-on: ubuntu-latest |
| 200 | + env: |
| 201 | + RUSTFLAGS: -Dwarnings |
| 202 | + steps: |
| 203 | + - name: Check out repo |
| 204 | + uses: actions/checkout@v4 |
| 205 | + - run: sudo apt update && sudo apt install qemu-system-x86 |
| 206 | + - name: Set up Rust |
| 207 | + run: | |
| 208 | + RUST_CHANNEL=$(awk -F'"' '/channel/{print $2}' litebox_runner_optee_on_machine/rust-toolchain.toml) |
| 209 | + rustup toolchain install ${RUST_CHANNEL} --profile minimal --no-self-update --component rustfmt,clippy --target x86_64-unknown-none |
| 210 | + rustup component add rust-src --toolchain ${RUST_CHANNEL}-x86_64-unknown-linux-gnu |
| 211 | + rustup default ${RUST_CHANNEL} |
| 212 | + rustup override set ${RUST_CHANNEL} |
| 213 | + rustup show |
| 214 | + - uses: Swatinem/rust-cache@v2 |
| 215 | + - run: ./.github/tools/github_actions_run_cargo clippy --all-features --target litebox_runner_optee_on_machine/x86_64-unknown-litebox.json --manifest-path=litebox_runner_optee_on_machine/Cargo.toml -Zbuild-std=core,compiler_builtins,alloc |
| 216 | + - run: | |
| 217 | + ./.github/tools/github_actions_run_cargo build -Zbuild-std=core,compiler_builtins,alloc -Zbuild-std-features=compiler-builtins-mem --manifest-path=litebox_runner_optee_on_machine/Cargo.toml --target litebox_runner_optee_on_machine/x86_64-unknown-litebox.json |
| 218 | + - run: | |
| 219 | + rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu |
| 220 | + rustup component add llvm-tools-preview --toolchain nightly-x86_64-unknown-linux-gnu |
| 221 | + cargo +nightly install bootimage |
| 222 | + cargo +nightly bootimage -Zbuild-std=core,compiler_builtins,alloc -Zbuild-std-features=compiler-builtins-mem --manifest-path=litebox_runner_optee_on_machine/Cargo.toml --target litebox_runner_optee_on_machine/x86_64-unknown-litebox.json |
| 223 | + qemu-system-x86_64 -machine q35 -cpu max -m 256M -drive format=raw,file=target/x86_64-unknown-litebox/debug/bootimage-litebox_runner_optee_on_machine.bin -nographic -no-reboot -device isa-debug-exit,iobase=0xf4,iosize=0x04 || true |
| 224 | + - name: Build documentation (fail on warnings) |
| 225 | + run: ./.github/tools/github_actions_run_cargo doc --no-deps --all-features --document-private-items |
| 226 | + |
197 | 227 | confirm_no_std: |
198 | 228 | name: Confirm no_std |
199 | 229 | runs-on: ubuntu-latest |
@@ -288,6 +318,8 @@ jobs: |
288 | 318 | -not -path './litebox_shim_optee/Cargo.toml' \ |
289 | 319 | -not -path './litebox_syscall_rewriter/Cargo.toml' \ |
290 | 320 | -not -path './litebox_runner_snp/Cargo.toml' \ |
| 321 | + -not -path './litebox_platform/Cargo.toml' \ |
| 322 | + -not -path './litebox_runner_optee_on_machine/Cargo.toml' \ |
291 | 323 | -not -path './dev_tests/Cargo.toml' \ |
292 | 324 | -print0 | \ |
293 | 325 | xargs -0 -I '{}' sh -c 'cd "$(dirname "{}")"; pwd; cargo build --locked --target x86_64-unknown-none || exit 1; echo; echo' |
0 commit comments