Merge pull request #57 from pbatard/ubuntu-mips-removal #255
This file contains 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: Linux, MinGW | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x64, ia32] | |
include: | |
- arch: x64 | |
dir: x86_64 | |
pkg: gcc-mingw-w64-x86-64 | |
tuple: x86_64-w64-mingw32- | |
- arch: ia32 | |
dir: ia32 | |
pkg: gcc-mingw-w64-i686 | |
tuple: i686-w64-mingw32- | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install gcc toolchain | |
run: sudo apt install ${{ matrix.pkg }} | |
- name: Build | |
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.tuple }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.arch }} | |
path: ./${{ matrix.dir }}/apps/*.efi | |
tests: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
arch: [x64, ia32] | |
include: | |
- arch: x64 | |
pkg: qemu-system-x86 | |
qemu_arch: x86_64 | |
qemu_opts: -M q35 | |
fw_base: OVMF | |
- arch: ia32 | |
pkg: qemu-system-x86 | |
qemu_arch: i386 | |
qemu_opts: -M pc | |
fw_base: OVMF | |
steps: | |
- name: Set up Linux environment | |
run: | | |
sudo apt-get update | |
sudo apt-get -y --no-install-recommends install ${{ matrix.pkg }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.arch }} | |
- name: Download UEFI firmware | |
run: | | |
fw_arch=$(echo ${{ matrix.arch }} | tr a-z A-Z) | |
fw_zip=${{ matrix.fw_base }}-${fw_arch}.zip | |
curl -O https://efi.akeo.ie/${{ matrix.fw_base }}/${fw_zip} | |
7z x ${fw_zip} | |
rm ${fw_zip} | |
- name: Download UEFI Shell | |
run: | | |
mkdir -p ./image/efi/boot | |
curl -L https://github.com/pbatard/UEFI-Shell/releases/download/24H2/shell${{ matrix.arch }}.efi -o ./image/efi/boot/boot${{ matrix.arch }}.efi | |
- name: Run tests | |
run: | | |
export UEFI_ARCH=${{ matrix.arch }} | |
export UEFI_DIR=./image | |
export QEMU_CMD="qemu-system-${{ matrix.qemu_arch }} ${{ matrix.qemu_opts }} -L . -drive if=pflash,format=raw,unit=0,file=${{ matrix.fw_base }}.fd,readonly=on -drive format=raw,file=fat:rw:image -nodefaults -nographic -serial stdio -net none" | |
./tests/gen_tests.sh ./tests/test_list.txt | |
./tests/run_tests.sh |