Skip to content

fix(test): 收紧 should_panic 判定 #825

fix(test): 收紧 should_panic 判定

fix(test): 收紧 should_panic 判定 #825

Workflow file for this run

# 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:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/setup
with:
cache-key-prefix: cargo-check
- 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
- name: Unit tests (host)
run: cargo test -p memory_types -p config -p page_table_entry -p arch
- name: Dependency audit
run: |
cargo install --locked cargo-deny || true
cargo deny check
build:
needs: check
runs-on: ubuntu-24.04-arm
permissions:
contents: read
packages: read
container:
image: ghcr.io/simple-xx/simplekernel-dev:latest
strategy:
fail-fast: false
matrix:
arch: [riscv64, aarch64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/setup
with:
cache-key-prefix: cargo-${{ matrix.arch }}
- name: Build
run: cargo xtask build --arch ${{ matrix.arch }}
- name: System Test
run: |
for i in $(seq 1 $SYSTEM_TEST_RUNS); do
echo "=== ${{ matrix.arch }} System Test Run $i/$SYSTEM_TEST_RUNS ==="
timeout 600 cargo xtask test --arch ${{ matrix.arch }} --all --timeout 120
echo "${{ matrix.arch }} system test run $i/$SYSTEM_TEST_RUNS passed"
done