pipeline: remove loongarch64 and add x86 build and test #102
Workflow file for this run
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: Test Build | |
| on: | |
| push: | |
| branches-ignore: | |
| - comp-and-judge | |
| pull_request: | |
| branches-ignore: | |
| - comp-and-judge | |
| workflow_dispatch: | |
| jobs: | |
| build-and-run-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [riscv64, loongarch64] | |
| include: | |
| - arch: riscv64 | |
| target: riscv64gc-unknown-none-elf | |
| platform: virt | |
| - arch: x86_64 | |
| target: x86_64-unknown-none | |
| platform: acpi_compat | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup rust nightly | |
| run: rustup component add rust-src llvm-tools | |
| - name: Setup QEMU | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-system-${{ matrix.arch }} qemu-kvm expect | |
| - name: Configure | |
| run: ./configure | |
| - name: Run build for ${{ matrix.arch }} targets | |
| run: | | |
| make build ARCH=${{ matrix.arch }} MODE=release | |
| zstd -k build/boot-${{ matrix.arch }}-${{ matrix.platform }}.img | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eonix-kernel-and-image-${{ matrix.arch }} | |
| path: | | |
| build/${{ matrix.target }}/release/eonix_kernel | |
| build/boot-${{ matrix.arch }}-${{ matrix.platform }}.img.zst | |
| - name: Test run for ${{ matrix.arch }} | |
| run: | | |
| echo "Fixing permissions for /dev/kvm..." | |
| sudo adduser $USER kvm | |
| sh script/test.sh | |
| env: | |
| ARCH: ${{ matrix.arch }} | |
| QEMU_ACCEL: '' | |
| timeout-minutes: 2 | |
| continue-on-error: true | |
| - name: Upload run log | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-${{ matrix.arch }}.log | |
| path: build/test-*.log |