Skip to content

.github/workflows/build.yml: correct paths of qemu rom #32

.github/workflows/build.yml: correct paths of qemu rom

.github/workflows/build.yml: correct paths of qemu rom #32

Workflow file for this run

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: Rename and generate SHA256
run: |
VERSION=$(echo ${GITHUB_REF#refs/heads/rel_} | tr '/' '_')
mv $GITHUB_WORKSPACE/coreboot/build/coreboot.rom $GITHUB_WORKSPACE/coreboot/build/qemu_q35_${VERSION}.rom
sha256sum $GITHUB_WORKSPACE/coreboot/build/qemu_q35_${VERSION}.rom > $GITHUB_WORKSPACE/coreboot/build/qemu_q35_${VERSION}.rom.sha256
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: "dasharo-${{ matrix.vendor }}-${{ matrix.model }}-${{ matrix.payload }}_${VERSION}"
path: |
qemu_q35_${VERSION}.rom
qemu_q35_${VERSION}.rom.sha256
retention-days: 30