diff --git a/.github/workflows/build-mos.yml b/.github/workflows/build-mos.yml index 5b863b84..2296665a 100644 --- a/.github/workflows/build-mos.yml +++ b/.github/workflows/build-mos.yml @@ -15,19 +15,8 @@ jobs: fail-fast: false matrix: config: - - { - "name": "x86_64 limine", - "arch": "x86_64", - "target": "mos_limine", - "compile_only": "OFF", - } - - { - "name": "RISC-V limine", - "arch": "riscv64", - "target": "mos_limine", - "artifact": "mos_limine.elf", - "compile_only": "ON", - } + - { "name": "x86_64 limine", "arch": "x86_64" } + - { "name": "RISC-V limine", "arch": "riscv64" } build_type: [Debug, Release] steps: @@ -47,6 +36,7 @@ jobs: echo 'Server = https://repo.mooody.me/$repo/$arch' >> /etc/pacman.conf pacman -Sy --noconfirm rustup mos-sdk ${{matrix.config.arch}}-mos-gcc ${{matrix.config.arch}}-mos-binutils ${{matrix.config.arch}}-mos-mlibc mos-llvm mos-rust + pacman -Sy --noconfirm python-ptyprocess rustup toolchain link mosdev /opt/mos-rust/ rustup default mosdev @@ -65,10 +55,9 @@ jobs: - name: Build run: | cd build - ninja ${{matrix.config.target}} mos_initrd + ninja mos_uefi_partition - name: Test - if: ${{matrix.config.compile_only}} == "OFF" run: | cd build ../scripts/run-tests.py --arch ${{matrix.config.arch}} --kernelspace-tests @@ -76,11 +65,12 @@ jobs: - name: Upload Bootable Artifact uses: actions/upload-artifact@v4.3.5 with: - name: MOS-${{matrix.config.target}}-${{matrix.build_type}}-${{matrix.config.arch}} + name: MOS-${{matrix.build_type}}-${{matrix.config.arch}} path: build/uefi-files - - name: Upload initrd + - name: Upload Test Results + if: always() uses: actions/upload-artifact@v4.3.5 with: - name: MOS-${{matrix.config.target}}-${{matrix.build_type}}-${{matrix.config.arch}}-initrd - path: build/initrd.cpio + name: MOS-${{matrix.build_type}}-${{matrix.config.arch}}-test-results + path: build/test-results/ diff --git a/scripts/run-tests.py b/scripts/run-tests.py index a0505c23..c686797e 100755 --- a/scripts/run-tests.py +++ b/scripts/run-tests.py @@ -53,11 +53,6 @@ def __init__(self) -> None: 'cpu': 'max', 'bios': '/usr/share/ovmf/x64/OVMF.4m.fd', }, - 'riscv64': { - 'machine': 'virt', - 'cpu': 'TODO', - 'bios': 'TODO', - }, } @@ -138,6 +133,10 @@ async def main() -> int: parser.add_argument('--kernelspace-tests', help='Run the kernel space tests', action='store_true') args = parser.parse_args() + if args.arch not in QEMU_ARCH_ARGS: + print('Unsupported architecture, skipping tests') + return 0 + # check if we are in the build directory if not os.path.exists('./uefi-files'): # try to change to the build directory