Skip to content

Commit

Permalink
CI: cross compile on GitHub runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ninelore committed Oct 29, 2024
1 parent 194ed15 commit cb92db8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cb92db8

Please sign in to comment.