Skip to content

Commit

Permalink
Automated releases
Browse files Browse the repository at this point in the history
  • Loading branch information
pykello committed Feb 28, 2024
1 parent 3645ed4 commit 8a8b289
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: edk2 build
on: [create,push]
on: [create,push,workflow_dispatch]

jobs:
build:
name: Build
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runs-on: [ubicloud, ubicloud-arm]
runs-on: ${{matrix.runs-on}}
include:
- runner: ubicloud-standard-2
platform: x64
- runner: ubicloud-standard-2-arm
platform: arm64

steps:
- name: Code checkout
Expand All @@ -18,3 +22,9 @@ jobs:
run: ./build-edk2
- name: List produced files
run: ls
- uses: ncipollo/release-action@v1
if: github.event_name == 'push'
with:
artifacts: "${{ github.workspace }}/CLOUDHV-${{ matrix.platform }}.fd"
body: "Release
allowUpdates: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
edk2_build/*
*.fd
6 changes: 3 additions & 3 deletions build-edk2
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ build_edk2() {
# Build
make -C acpica -j "$(nproc)"
# shellcheck disable=SC1091

# edk2setup relies on null expansions.
set -xe +u
source edk2/edksetup.sh
Expand All @@ -102,10 +102,10 @@ build_edk2() {

if [ "$architecture" = "x86_64" ]; then
build -a X64 -t GCC5 -p OvmfPkg/CloudHv/CloudHvX64.dsc -b RELEASE -n 0
cp Build/CloudHvX64/RELEASE_GCC5/FV/CLOUDHV.fd "$WORKLOADS_DIR"
cp Build/CloudHvX64/RELEASE_GCC5/FV/CLOUDHV.fd "$WORKLOADS_DIR/CLOUDHV-x64.fd"
elif [ "$architecture" = "aarch64" ]; then
build -a AARCH64 -t GCC5 -p ArmVirtPkg/ArmVirtCloudHv.dsc -b RELEASE -n 0
cp Build/ArmVirtCloudHv-AARCH64/RELEASE_GCC5/FV/CLOUDHV_EFI.fd "$WORKLOADS_DIR"
cp Build/ArmVirtCloudHv-AARCH64/RELEASE_GCC5/FV/CLOUDHV_EFI.fd "$WORKLOADS_DIR/CLOUDHV-arm64.fd"
else
echo "Unsupported architecture: $architecture"
fi
Expand Down

0 comments on commit 8a8b289

Please sign in to comment.