|
1 | 1 | name: Starry Test Harness CI Test |
2 | 2 |
|
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +concurrency: |
| 6 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} |
| 7 | + cancel-in-progress: true |
| 8 | + |
| 9 | +jobs: |
| 10 | + ci-test: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + env: |
| 13 | + ARCH: aarch64 |
| 14 | + STARRYOS_REMOTE: https://github.com/Starry-OS/StarryOS.git |
| 15 | + STARRYOS_REF: main |
| 16 | + STARRYOS_ROOT: ${{ github.workspace }}/.cache/StarryOS |
| 17 | + steps: |
| 18 | + - name: Checkout Starry Test Harness |
| 19 | + uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + repository: kylin-x-kernel/starry-test-harness |
| 22 | + path: starry-test-harness |
| 23 | + |
| 24 | + - name: Install Rust cache for harness |
| 25 | + uses: Swatinem/rust-cache@v2 |
| 26 | + with: |
| 27 | + shared-key: starry-ci-harness |
| 28 | + |
| 29 | + - name: Install musl toolchain |
| 30 | + uses: arceos-org/setup-musl@v1 |
| 31 | + with: |
| 32 | + arch: ${{ env.ARCH }} |
| 33 | + |
| 34 | + - name: Install QEMU |
| 35 | + uses: arceos-org/setup-qemu@v1 |
| 36 | + with: |
| 37 | + version: 10.1.0 |
| 38 | + arch_list: ${{ env.ARCH }} |
| 39 | + |
| 40 | + - name: Install filesystem tools |
| 41 | + run: sudo apt-get update && sudo apt-get install -y e2fsprogs |
| 42 | + |
| 43 | + - name: 执行 ci-test |
| 44 | + working-directory: starry-test-harness |
| 45 | + run: make ci-test run |
| 46 | + |
| 47 | + - name: Dump suite logs |
| 48 | + working-directory: starry-test-harness |
| 49 | + if: always() |
| 50 | + run: | |
| 51 | + if [ -d logs/ci ]; then |
| 52 | + find logs/ci -name 'suite.log' -print -exec sh -c 'echo "::group::{}"; cat "$1"; echo "::endgroup::"' _ {} \; |
| 53 | + else |
| 54 | + echo "logs/ci not found" |
| 55 | + fi |
| 56 | +
|
| 57 | + - name: Upload suite artifacts |
| 58 | + if: always() |
| 59 | + uses: actions/upload-artifact@v4 |
| 60 | + with: |
| 61 | + name: ci-logs-${{ github.run_id }} |
| 62 | + path: starry-test-harness/logs/ci |
| 63 | + if-no-files-found: warn |
| 64 | +name: Starry Test Harness CI Test |
| 65 | + |
3 | 66 | on: |
4 | 67 | workflow_run: |
5 | 68 | workflows: |
@@ -128,5 +191,3 @@ jobs: |
128 | 191 | name: ci-logs-${{ github.run_id }} |
129 | 192 | path: starry-test-harness/logs/ci |
130 | 193 | if-no-files-found: warn |
131 | | - |
132 | | - |
|
0 commit comments