From cb92db8b98427ea788a8f0257f1f7e7516667731 Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Tue, 29 Oct 2024 06:34:34 +0100 Subject: [PATCH] CI: cross compile on GitHub runner --- .github/workflows/build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dca53f..bac25ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,9 +12,9 @@ jobs: strategy: matrix: platform: ["x86_64", "arm64"] - runs-on: ${{ matrix.platform == 'x86_64' && 'ubuntu-latest' || 'ARM64' }} + runs-on: ubuntu-latest container: - image: registry.fedoraproject.org/fedora-minimal:39 + image: registry.fedoraproject.org/fedora-minimal:40 steps: - name: Install dependencies @@ -23,6 +23,11 @@ jobs: dnf5 install -y git make gcc ccache flex bison elfutils-devel parted vboot-utils golang xz bc tar openssl-devel python3-pip uboot-tools pip3 install depthcharge-tools + - name: Install and set up cross compiler + if: matrix.platform == 'arm64' + run: | + dnf5 install -y gcc-aarch64-linux-gnu + - uses: actions/checkout@v3 with: submodules: true @@ -63,7 +68,7 @@ jobs: run: cp configs/kernel.${{ matrix.platform == 'x86_64' && 'x86' || 'a64' }} kernel/.config - name: Build submarine - run: make CC="ccache gcc" -j$(nproc) ${{ matrix.platform }} + run: make ${{ matrix.platform == 'x86_64' && 'CC="ccache gcc"' }} -j$(nproc) ${{ matrix.platform }} - name: Upload build artifacts uses: actions/upload-artifact@v3