Recursive build of dependencies #142
Workflow file for this run
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
--- | |
# Example of using firmware-action | |
name: example | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- main | |
env: | |
APPLY_FIXES: none | |
APPLY_FIXES_EVENT: pull_request | |
APPLY_FIXES_MODE: commit | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
# Example of building coreboot | |
build-coreboot: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
coreboot-version: ['4.19', '4.20.1', '4.21'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Clone coreboot repo | |
run: | | |
git clone --branch "${{ matrix.coreboot-version }}" --depth 1 https://review.coreboot.org/coreboot my_super_dooper_awesome_coreboot | |
- name: Move my defconfig into place (filename must not contain '.defconfig') | |
run: | | |
mv "tests/coreboot_${{ matrix.coreboot-version }}/seabios.defconfig" "seabios_defconfig" | |
- name: firmware-action | |
uses: ./ | |
#uses: 9elements/firmware-action | |
with: | |
config: 'tests/example_config.json' | |
target: 'coreboot-example' | |
recursive: 'false' | |
env: | |
COREBOOT_VERSION: ${{ matrix.coreboot-version }} | |
- name: Get artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coreboot-${{ matrix.coreboot-version }} | |
path: output | |
retention-days: 14 | |
# Example of building Linux kernel | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
linux-version: [6.1.45] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Prepare linux kernel | |
run: | | |
# Download source files | |
wget --quiet "https://cdn.kernel.org/pub/linux/kernel/v${LINUX_MAJOR_VERSION}.x/linux-${{ matrix.linux-version }}.tar.xz" | |
wget --quiet "https://cdn.kernel.org/pub/linux/kernel/v${LINUX_MAJOR_VERSION}.x/linux-${{ matrix.linux-version }}.tar.sign" | |
unxz "linux-${{ matrix.linux-version }}.tar.xz" >/dev/null | |
# Verify GPG signature | |
gpg2 --locate-keys [email protected] [email protected] | |
gpg2 --verify "linux-${{ matrix.linux-version }}.tar.sign" | |
# Extract | |
tar -xvf "linux-${{ matrix.linux-version }}.tar" | |
env: | |
LINUX_MAJOR_VERSION: 6 | |
- name: Move my defconfig into place (filename must not contain '.defconfig') | |
run: | | |
mv "tests/linux_${{ matrix.linux-version }}/linux.defconfig" "ci_defconfig" | |
- name: firmware-action | |
uses: ./ | |
#uses: 9elements/firmware-action | |
with: | |
config: 'tests/example_config.json' | |
target: 'linux-example' | |
recursive: 'false' | |
env: | |
LINUX_VERSION: ${{ matrix.linux-version }} | |
- name: Get artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.linux-version }} | |
path: output | |
retention-days: 14 | |
# Example of building EDK2 | |
build-edk2: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
edk2-version: ['edk2-stable202208', 'edk2-stable202211'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Clone edk2 repo | |
run: | | |
git clone --recurse-submodules --branch "${{ matrix.edk2-version }}" --depth 1 https://github.com/tianocore/edk2.git Edk2 | |
- name: Prepare file with build arguments | |
run: | | |
echo "-D BOOTLOADER=COREBOOT -D TPM_ENABLE=TRUE -D NETWORK_IPXE=TRUE" > "edk2_config.cfg" | |
- name: firmware-action | |
uses: ./ | |
#uses: 9elements/firmware-action | |
with: | |
config: 'tests/example_config.json' | |
target: 'edk2-example' | |
recursive: 'false' | |
env: | |
EDK2_VERSION: ${{ matrix.edk2-version }} | |
- name: Get artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.edk2-version }} | |
path: output | |
retention-days: 14 |