0002-build.sh-add-support-for-uefi-seabios-_apuX-builds.patch: use da… #29
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: Dasharo | |
on: | |
push: | |
branches: | |
- rel_* | |
jobs: | |
build_pcengines: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/dasharo/dasharo-sdk:v1.6.0-rc4 | |
options: --user 1001 | |
strategy: | |
matrix: | |
vendor: [ pcengines ] | |
model: [ apu2, apu3, apu4, apu6 ] | |
payload: [ seabios ] | |
steps: | |
- name: Checkout coreboot | |
run: | | |
COREBOOT_VERSION=$(echo $GITHUB_REF_NAME | cut -d_ -f2) | |
CORELABEL=$(echo $COREBOOT_VERSION | awk -F '.' '{if ($3 == "00") print $1"."$2; else print $1"."$2"."$3}') | |
echo "Extracted Coreboot version: $CORELABEL" | |
git clone https://review.coreboot.org/coreboot | |
cd coreboot | |
git checkout $CORELABEL -b patchqueue | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# Checkout pull request HEAD commit instead of merge commit | |
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
# Fetch complete history | |
fetch-depth: 0 | |
path: coreboot/.git/patches | |
- name: Set Up Git | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
ln -s patches .git/patches/patchqueue | |
touch .git/patches/patchqueue/status | |
- name: Apply Patches Using Guilt | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
guilt push -a | |
- name: Checkout coreboot submodules and add annoted tag | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
git submodule update --init --recursive --checkout | |
# this is for verification of reproducibility in local builds | |
git tag -a github-actions-bot-tag -m "$GITHUB_REF_NAME" | |
- name: Build Dasharo | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
cp configs/config.${{ matrix.vendor }}_${{ matrix.payload }}_${{ matrix.model }} .config | |
make olddefconfig | |
make BUILD_TIMELESS=1 | |
- name: Search for coreboot.rom | |
run: | | |
find $GITHUB_WORKSPACE/coreboot -name coreboot.rom | |
- name: Save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}" | |
path: | | |
coreboot/build/coreboot.rom | |
retention-days: 30 | |
build_q35: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/dasharo/dasharo-sdk:v1.6.0-rc4 | |
options: --user 1001 | |
strategy: | |
matrix: | |
vendor: [ emulation_qemu ] | |
model: [ x86_q35 ] | |
payload: [ smm_tseg_seabios ] | |
steps: | |
- name: Checkout coreboot | |
run: | | |
COREBOOT_VERSION=$(echo $GITHUB_REF_NAME | cut -d_ -f2) | |
CORELABEL=$(echo $COREBOOT_VERSION | awk -F '.' '{if ($3 == "00") print $1"."$2; else print $1"."$2"."$3}') | |
echo "Extracted Coreboot version: $CORELABEL" | |
git clone https://review.coreboot.org/coreboot | |
cd coreboot | |
git checkout $CORELABEL -b patchqueue | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
# Checkout pull request HEAD commit instead of merge commit | |
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit | |
ref: ${{ github.event.pull_request.head.sha }} | |
# Fetch complete history | |
fetch-depth: 0 | |
path: coreboot/.git/patches | |
- name: Set Up Git | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
ln -s patches .git/patches/patchqueue | |
touch .git/patches/patchqueue/status | |
- name: Apply Patches Using Guilt | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
guilt push -a | |
- name: Checkout coreboot submodules and add annoted tag | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
git submodule update --init --recursive --checkout | |
# this is for verification of reproducibility in local builds | |
git tag -a github-actions-bot-tag -m "$GITHUB_REF_NAME" | |
- name: Build Dasharo | |
run: | | |
cd $GITHUB_WORKSPACE/coreboot | |
cp configs/config.${{ matrix.vendor }}_${{ matrix.model }}_${{ matrix.payload }} .config | |
make olddefconfig | |
make BUILD_TIMELESS=1 | |
- name: Search for coreboot.rom | |
run: | | |
find $GITHUB_WORKSPACE/coreboot -name coreboot.rom | |
- name: Save artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}" | |
path: | | |
coreboot/build/coreboot.rom | |
retention-days: 30 | |