Skip to content

Add Starry test harness workflow #1

Add Starry test harness workflow

Add Starry test harness workflow #1

name: Starry Test Harness CI Test
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
ci-test:
runs-on: ubuntu-latest
env:
ARCH: aarch64
STARRYOS_REMOTE: https://github.com/Starry-OS/StarryOS.git
STARRYOS_REF: main
STARRYOS_ROOT: ${{ github.workspace }}/.cache/StarryOS
steps:
- name: Checkout Starry Test Harness
uses: actions/checkout@v4
with:
repository: kylin-x-kernel/starry-test-harness
path: starry-test-harness
- name: Install Rust cache for harness
uses: Swatinem/rust-cache@v2
with:
shared-key: starry-ci-harness
- name: Install musl toolchain
uses: arceos-org/setup-musl@v1
with:
arch: ${{ env.ARCH }}
- name: Install QEMU
uses: arceos-org/setup-qemu@v1
with:
version: 10.1.0
arch_list: ${{ env.ARCH }}
- name: Install filesystem tools
run: sudo apt-get update && sudo apt-get install -y e2fsprogs
- name: 执行 ci-test
working-directory: starry-test-harness
run: make ci-test run
- name: Dump suite logs
working-directory: starry-test-harness
if: always()
run: |
if [ -d logs/ci ]; then
find logs/ci -name 'suite.log' -print -exec sh -c 'echo "::group::{}"; cat "$1"; echo "::endgroup::"' _ {} \;
else
echo "logs/ci not found"
fi
- name: Upload suite artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: ci-logs-${{ github.run_id }}
path: starry-test-harness/logs/ci
if-no-files-found: warn