test: make bootstrap host check cross-platform #7
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| linux-012-ubuntu: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install host dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-system-x86 | |
| - name: Run unit tests | |
| run: python3 -m unittest discover -s tests -v | |
| - name: Check host dependencies | |
| run: ./scripts/bootstrap-host.sh | |
| - name: Build Linux 0.12 images from source | |
| run: python3 rebuild/driver.py build | |
| - name: Verify Linux 0.12 boots and runs ls | |
| run: ./scripts/verify.sh | |
| - name: Upload verification artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: linux-012-ubuntu-ci-artifacts | |
| path: | | |
| out/verify | |
| rebuild/out/logs | |
| linux-012-windows-smoke: | |
| runs-on: windows-2022 | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Install QEMU | |
| shell: powershell | |
| run: choco install qemu --no-progress -y | |
| - name: Run unit tests | |
| shell: powershell | |
| run: py -3 -m unittest discover -s tests -v | |
| - name: Check Windows QEMU host dependency | |
| shell: powershell | |
| run: py -3 tools/qemu_driver.py bootstrap-host | |
| - name: Prepare repo runtime image snapshot | |
| shell: powershell | |
| run: | | |
| py -3 -c "from rebuild.driver import BuildPaths, ensure_repo_runtime_images, repo_root; import sys; paths = BuildPaths.from_root(repo_root()); raise SystemExit(ensure_repo_runtime_images(paths))" | |
| - name: Windows dry-run verification from repo images | |
| shell: powershell | |
| run: | | |
| $env:LINUX012_BOOT_SOURCE_IMAGE = (Join-Path $PWD 'images\bootimage-0.12-hd') | |
| $env:LINUX012_HARD_DISK_IMAGE = (Join-Path $PWD 'out\repo-images\hdc-0.12.img') | |
| py -3 tools/qemu_driver.py verify --dry-run | |
| py -3 tools/qemu_driver.py run-window --dry-run | |
| - name: Upload Windows smoke artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: linux-012-windows-ci-artifacts | |
| path: | | |
| out/repo-images |