Skip to content

linux -> v6.12

linux -> v6.12 #94

Workflow file for this run

name: Build submarine
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
platform: ["x86_64", "arm64"]
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora-minimal:41
steps:
- name: Install dependencies
run: |
dnf5 update -y
dnf5 install -y git make gcc ccache flex bison elfutils-devel parted vboot-utils golang xz bc tar openssl-devel openssl-devel-engine python3-pip uboot-tools ${{ matrix.platform == 'arm64' && 'gcc-aarch64-linux-gnu' || '' }}
pip3 install depthcharge-tools
- uses: actions/checkout@v4
with:
submodules: true
- name: Add Git safe directory
run: |
git config --global --add safe.directory $(pwd)
- name: Setup enviroment variables
run: |
echo "PATH=$PATH:$HOME/go/bin" >> $GITHUB_ENV
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "CCACHE_DIR=$(pwd)/ccache" >> $GITHUB_ENV
echo "UROOT_COMMIT=$(git rev-parse HEAD:u-root)" >> $GITHUB_ENV
echo "KERNEL_COMMIT=$(git rev-parse HEAD:kernel)" >> $GITHUB_ENV
- name: Setup Go cache
uses: actions/cache@v4
with:
path: ${{ env.GOCACHE }}
key: go-${{ matrix.platform }}-${{ env.UROOT_COMMIT }}
restore-keys: |
go-${{ matrix.platform }}-
- name: Setup ccache cache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.platform }}-${{ env.KERNEL_COMMIT }}-${{ hashFiles('kernel.config') }}
restore-keys: |
ccache-${{ matrix.platform }}-${{ env.KERNEL_COMMIT }}-
ccache-${{ matrix.platform }}-
- name: Install u-root
run: go install github.com/u-root/u-root@$UROOT_COMMIT
- name: Copy submarine kernel configuration
run: cp configs/kernel.${{ matrix.platform == 'x86_64' && 'x86' || 'a64' }} kernel/.config
- name: Build submarine
run: make ${{ matrix.platform == 'x86_64' && 'CC="ccache gcc"' || '' }} -j$(nproc) ${{ matrix.platform }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: submarine-${{ matrix.platform }}
path: build