|
| 1 | +name: Starry Test Harness CI Test |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_run: |
| 5 | + workflows: |
| 6 | + - Build and Test |
| 7 | + types: |
| 8 | + - completed |
| 9 | + |
| 10 | +jobs: |
| 11 | + ci-test: |
| 12 | + if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 13 | + runs-on: ubuntu-latest |
| 14 | + env: |
| 15 | + ARCH: aarch64 |
| 16 | + STARRYOS_REMOTE: https://github.com/Starry-OS/StarryOS.git |
| 17 | + STARRYOS_REF: main |
| 18 | + STARRYOS_ROOT: ${{ github.workspace }}/.cache/StarryOS |
| 19 | + steps: |
| 20 | + - name: Checkout Starry Test Harness |
| 21 | + uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + repository: kylin-x-kernel/starry-test-harness |
| 24 | + path: starry-test-harness |
| 25 | + |
| 26 | + - name: Install Rust cache for harness |
| 27 | + uses: Swatinem/rust-cache@v2 |
| 28 | + with: |
| 29 | + shared-key: starry-ci-harness |
| 30 | + |
| 31 | + - name: Install musl toolchain |
| 32 | + uses: arceos-org/setup-musl@v1 |
| 33 | + with: |
| 34 | + arch: ${{ env.ARCH }} |
| 35 | + |
| 36 | + - name: Install QEMU |
| 37 | + uses: arceos-org/setup-qemu@v1 |
| 38 | + with: |
| 39 | + version: 10.1.0 |
| 40 | + arch_list: ${{ env.ARCH }} |
| 41 | + |
| 42 | + - name: Install filesystem tools |
| 43 | + run: sudo apt-get update && sudo apt-get install -y e2fsprogs |
| 44 | + |
| 45 | + - name: 执行 ci-test |
| 46 | + working-directory: starry-test-harness |
| 47 | + run: make ci-test run |
| 48 | + |
| 49 | + - name: Dump suite logs |
| 50 | + working-directory: starry-test-harness |
| 51 | + if: always() |
| 52 | + run: | |
| 53 | + if [ -d logs/ci ]; then |
| 54 | + find logs/ci -name 'suite.log' -print -exec sh -c 'echo "::group::{}"; cat "$1"; echo "::endgroup::"' _ {} \; |
| 55 | + else |
| 56 | + echo "logs/ci not found" |
| 57 | + fi |
| 58 | +
|
| 59 | + - name: Upload suite artifacts |
| 60 | + if: always() |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: ci-logs-${{ github.run_id }} |
| 64 | + path: starry-test-harness/logs/ci |
| 65 | + if-no-files-found: warn |
| 66 | +name: Starry Test Harness CI Test |
| 67 | + |
| 68 | +on: |
| 69 | + workflow_run: |
| 70 | + workflows: |
| 71 | + - Build and Test |
| 72 | + types: |
| 73 | + - completed |
| 74 | + |
| 75 | +jobs: |
| 76 | + ci-test: |
| 77 | + if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 78 | + runs-on: ubuntu-latest |
| 79 | + env: |
| 80 | + ARCH: aarch64 |
| 81 | + STARRYOS_REMOTE: https://github.com/Starry-OS/StarryOS.git |
| 82 | + STARRYOS_REF: main |
| 83 | + STARRYOS_ROOT: ${{ github.workspace }}/.cache/StarryOS |
| 84 | + steps: |
| 85 | + - name: Checkout Starry Test Harness |
| 86 | + uses: actions/checkout@v4 |
| 87 | + with: |
| 88 | + repository: kylin-x-kernel/starry-test-harness |
| 89 | + path: starry-test-harness |
| 90 | + |
| 91 | + - name: Install Rust cache for harness |
| 92 | + uses: Swatinem/rust-cache@v2 |
| 93 | + with: |
| 94 | + shared-key: starry-ci-harness |
| 95 | + |
| 96 | + - name: Install musl toolchain |
| 97 | + uses: arceos-org/setup-musl@v1 |
| 98 | + with: |
| 99 | + arch: ${{ env.ARCH }} |
| 100 | + |
| 101 | + - name: Install QEMU |
| 102 | + uses: arceos-org/setup-qemu@v1 |
| 103 | + with: |
| 104 | + version: 10.1.0 |
| 105 | + arch_list: ${{ env.ARCH }} |
| 106 | + |
| 107 | + - name: Install filesystem tools |
| 108 | + run: sudo apt-get update && sudo apt-get install -y e2fsprogs |
| 109 | + |
| 110 | + - name: 执行 ci-test |
| 111 | + working-directory: starry-test-harness |
| 112 | + run: make ci-test run |
| 113 | + |
| 114 | + - name: Dump suite logs |
| 115 | + working-directory: starry-test-harness |
| 116 | + if: always() |
| 117 | + run: | |
| 118 | + if [ -d logs/ci ]; then |
| 119 | + find logs/ci -name 'suite.log' -print -exec sh -c 'echo "::group::{}"; cat "$1"; echo "::endgroup::"' _ {} \; |
| 120 | + else |
| 121 | + echo "logs/ci not found" |
| 122 | + fi |
| 123 | +
|
| 124 | + - name: Upload suite artifacts |
| 125 | + if: always() |
| 126 | + uses: actions/upload-artifact@v4 |
| 127 | + with: |
| 128 | + name: ci-logs-${{ github.run_id }} |
| 129 | + path: starry-test-harness/logs/ci |
| 130 | + if-no-files-found: warn |
| 131 | + |
| 132 | + |
0 commit comments