:: limine / .github / workflows / check.yml 2.3 KB raw

1
name: Check for compilation failures
2
3
on: [push, pull_request]
4
5
jobs:
6
  build:
7
    name: Check for compilation failures
8
    runs-on: ubuntu-latest
9
    container: archlinux:latest
10
11
    steps:
12
      - name: Install dependencies
13
        run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake nasm curl mtools llvm clang lld
14
15
      - name: Checkout code
16
        uses: actions/checkout@v6
17
18
      - name: Build the bootloader (LLVM, default)
19
        run: ./bootstrap && ./configure --enable-werror --enable-all && make all && make distclean
20
21
      - name: Set cross GCC version
22
        run: echo "GCC_VERSION=15.2.0" >> $GITHUB_ENV
23
24
      - name: Download GCC cross toolchains
25
        run: |
26
          set -e
27
          for i in aarch64 loongarch64 riscv64 x86_64; do
28
            ( curl -Lo x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${{ env.GCC_VERSION }}/x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz && tar -xf x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz ) &
29
            WAITING_ON_PIDS="$WAITING_ON_PIDS $!"
30
          done
31
          for pid in $WAITING_ON_PIDS; do
32
            wait $pid
33
          done
34
35
      - name: Build the bootloader (GNU, x86)
36
        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/x86_64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=x86_64-linux- --enable-werror --enable-bios --enable-uefi-ia32 --enable-uefi-x86-64 && make all -j$(nproc) && make distclean
37
38
      - name: Build the bootloader (GNU, aarch64)
39
        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/aarch64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=aarch64-linux- --enable-werror --enable-uefi-aarch64 && make all -j$(nproc) && make distclean
40
41
      - name: Build the bootloader (GNU, riscv64)
42
        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/riscv64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=riscv64-linux- --enable-werror --enable-uefi-riscv64 && make all -j$(nproc) && make distclean
43
44
      - name: Build the bootloader (GNU, loongarch64)
45
        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/loongarch64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=loongarch64-linux- --enable-werror --enable-uefi-loongarch64 && make all -j$(nproc) && make distclean
tab: 248 wrap: offon