From f57440b711af07d1a10757478666003919e07fc8 Mon Sep 17 00:00:00 2001 From: Maciej Pijanowski Date: Sun, 8 Oct 2023 11:18:08 +0200 Subject: [PATCH] .github/workflows/build.yml: add Signed-off-by: Maciej Pijanowski --- .github/scripts/build-qemu.sh | 19 +++++++++++++++ .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/scripts/build-qemu.sh create mode 100644 .github/workflows/build.yml diff --git a/.github/scripts/build-qemu.sh b/.github/scripts/build-qemu.sh new file mode 100644 index 0000000000..9b49b06643 --- /dev/null +++ b/.github/scripts/build-qemu.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +make -C BaseTools +source ./edksetup.sh + +export EDK2_PLATFORMS_PATH="$WORKSPACE/edk2-platforms" +export PACKAGES_PATH="$WORKSPACE:\ +$EDK2_PLATFORMS_PATH/Platform/Intel:\ +$EDK2_PLATFORMS_PATH/Silicon/Intel:\ +$EDK2_PLATFORMS_PATH/Features/Intel:\ +$EDK2_PLATFORMS_PATH/Features/Intel/Debugging:\ +$EDK2_PLATFORMS_PATH/Features/Intel/Network:\ +$EDK2_PLATFORMS_PATH/Features/Intel/OutOfBandManagement:\ +$EDK2_PLATFORMS_PATH/Features/Intel/PowerManagement:\ +$EDK2_PLATFORMS_PATH/Features/Intel/SystemInformation:\ +$EDK2_PLATFORMS_PATH/Features/Intel/UserInterface" + +build -a IA32 -a X64 -t GCC5 -b RELEASE -p OvmfPkg/OvmfPkgX64.dsc +build -a IA32 -a X64 -t GCC5 -b DEBUG -p OvmfPkg/OvmfPkgX64.dsc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..793ce404a1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Check EDK2 QEMU Build + +on: + push: + branches: + - dasharo + pull_request: + branches: + - dasharo + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + submodules: 'recursive' # Checkout submodules recursively. + + - name: Clone edk2-platforms Repository + run: | + git clone https://github.com/Dasharo/edk2-platforms.git && \ + cd edk2-platforms && \ + git checkout 3323ed481d35096fb6a7eae7b49f35eff00f86cf && \ + cd - + + - name: Build OVMF Firmware Image + run: | + docker run --rm -i -v $PWD:/home/coreboot/coreboot:rw \ + -u $(id -u):$(id -g) -w /home/coreboot/coreboot \ + coreboot/coreboot-sdk:2021-09-23_b0d87f753c \ + ./github/scripts/build-qemu.sh + + - name: Check Build Artifacts + run: | + if [ -f "Build/Ovmf/RELEASE_GCC5/FV/OVMF_CODE.fd" ] && [ -f "Build/Ovmf/RELEASE_GCC5/FV/OVMF_VARS.fd" ]; then + echo "RELEASE build successful. OVMF firmware image files found." + elif [ -f "Build/Ovmf/DEBUG_GCC5/FV/OVMF_CODE.fd" ] && [ -f "Build/Ovmf/DEBUG_GCC5/FV/OVMF_VARS.fd" ]; then + echo "DEBUG build successful. OVMF firmware image files found." + else + echo "Build failed. OVMF firmware image files not found." + exit 1 + fi