feat: rewrite TCB ownership to Arc<TCB> & complete P2 #80
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright The SimpleKernel Contributors | |
| name: build | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [published] | |
| # Cancel in-progress runs for the same branch/PR | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # PR: 3 runs for speed; push/release: 10 runs for stability | |
| SYSTEM_TEST_RUNS: ${{ github.event_name == 'pull_request' && 3 || 10 }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| contents: read | |
| packages: read | |
| container: | |
| image: ghcr.io/simple-xx/simplekernel-dev:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Shallow submodule init | |
| run: | | |
| git config --global --add safe.directory '*' | |
| git submodule update --init --recursive --depth 1 | |
| - name: Setup Rust toolchain | |
| run: rustup show | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: cargo-check-${{ runner.arch }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
| restore-keys: | | |
| cargo-check-${{ runner.arch }}- | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Clippy (riscv64) | |
| run: cargo clippy --target riscv64gc-unknown-none-elf -- -D warnings | |
| - name: Clippy (aarch64) | |
| run: cargo clippy --target aarch64-unknown-none -- -D warnings | |
| build-riscv64: | |
| needs: check | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| contents: read | |
| packages: read | |
| container: | |
| image: ghcr.io/simple-xx/simplekernel-dev:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Shallow submodule init | |
| run: | | |
| git config --global --add safe.directory '*' | |
| git submodule update --init --recursive --depth 1 | |
| - name: Setup Rust toolchain | |
| run: rustup show | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: cargo-riscv64-${{ runner.arch }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
| restore-keys: | | |
| cargo-riscv64-${{ runner.arch }}- | |
| - name: Build | |
| run: cargo xtask build --arch riscv64 | |
| - name: System Test | |
| run: | | |
| for i in $(seq 1 $SYSTEM_TEST_RUNS); do | |
| echo "=== riscv64 System Test Run $i/$SYSTEM_TEST_RUNS ===" | |
| timeout 300 cargo xtask run --arch riscv64 > /tmp/st_out_$i.txt 2>&1 || true | |
| cat /tmp/st_out_$i.txt | |
| if ! grep -q "RESULT: ALL TESTS PASSED" /tmp/st_out_$i.txt; then | |
| echo "riscv64 system test run $i/$SYSTEM_TEST_RUNS FAILED" | |
| exit 1 | |
| fi | |
| echo "riscv64 system test run $i/$SYSTEM_TEST_RUNS passed" | |
| done | |
| build-aarch64: | |
| needs: check | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| contents: read | |
| packages: read | |
| container: | |
| image: ghcr.io/simple-xx/simplekernel-dev:latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Shallow submodule init | |
| run: | | |
| git config --global --add safe.directory '*' | |
| git submodule update --init --recursive --depth 1 | |
| - name: Setup Rust toolchain | |
| run: rustup show | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: cargo-aarch64-${{ runner.arch }}-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
| restore-keys: | | |
| cargo-aarch64-${{ runner.arch }}- | |
| - name: Build | |
| run: cargo xtask build --arch aarch64 | |
| - name: System Test | |
| run: | | |
| for i in $(seq 1 $SYSTEM_TEST_RUNS); do | |
| echo "=== aarch64 System Test Run $i/$SYSTEM_TEST_RUNS ===" | |
| timeout 300 cargo xtask run --arch aarch64 > /tmp/st_out_$i.txt 2>&1 || true | |
| cat /tmp/st_out_$i.txt | |
| if ! grep -q "RESULT: ALL TESTS PASSED" /tmp/st_out_$i.txt; then | |
| echo "aarch64 system test run $i/$SYSTEM_TEST_RUNS FAILED" | |
| exit 1 | |
| fi | |
| echo "aarch64 system test run $i/$SYSTEM_TEST_RUNS passed" | |
| done |