Fix MinGW compilation and silence some warnings #56
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, gcc, gnu-efi | |
on: | |
push: | |
paths-ignore: | |
- '.gitignore' | |
- '.gitattributes' | |
- '**.cmd' | |
- '!set_grub_cpu.cmd' | |
- '**.md' | |
- '**.sh' | |
- '!set_grub_cpu.sh' | |
- '**.txt' | |
- '**.vbs' | |
pull_request: | |
paths-ignore: | |
- '.gitignore' | |
- '.gitattributes' | |
- '**.cmd' | |
- '!set_grub_cpu.cmd' | |
- '**.md' | |
- '**.sh' | |
- '!set_grub_cpu.sh' | |
- '**.txt' | |
- '**.vbs' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x64, ia32, aa64, arm, riscv64] | |
include: | |
- arch: x64 | |
pkg: gcc-mingw-w64-x86-64 | |
tuple: x86_64-w64-mingw32- | |
- arch: ia32 | |
pkg: gcc-mingw-w64-i686 | |
tuple: i686-w64-mingw32- | |
- arch: aa64 | |
pkg: gcc-aarch64-linux-gnu | |
tuple: aarch64-linux-gnu- | |
- arch: arm | |
pkg: gcc-arm-linux-gnueabi | |
tuple: arm-linux-gnueabi- | |
- arch: riscv64 | |
pkg: gcc-riscv64-linux-gnu | |
tuple: riscv64-linux-gnu- | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install gcc toolchain | |
run: sudo apt install ${{ matrix.pkg }} | |
- name: Patch GRUB | |
run: | | |
cd grub | |
git apply ../0001-GRUB-fixes.patch | |
cd .. | |
- name: Build drivers | |
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.tuple }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
name: gcc_gnu-efi_${{ matrix.arch }} | |
path: src/*.efi | |
merge-artifacts: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Merge Artifacts | |
uses: actions/upload-artifact/merge@v4 | |
with: | |
name: gcc_gnu-efi | |
delete-merged: true |