Skip to content

Commit c1fa935

Browse files
committed
remove callable action and simplify build yml
1 parent 5056681 commit c1fa935

3 files changed

Lines changed: 29 additions & 209 deletions

File tree

.github/actions/build-platform/action.yml

Lines changed: 0 additions & 162 deletions
This file was deleted.

.github/workflows/build-haf-tfa.yml

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -41,59 +41,41 @@ jobs:
4141
git config --global user.email "github-actions[bot]@users.noreply.github.com"
4242
git config --global --add safe.directory $GITHUB_WORKSPACE
4343
44-
- name: Stuart Build and Run
45-
uses: ./.github/actions/build-platform
46-
with:
47-
platform-config: 'Platforms/QemuSbsaPkg/PlatformBuild.py'
48-
platform-name: 'SBSA'
49-
tool-chain: 'GCC5'
50-
stuart-args: 'HAF_TFA_BUILD=TRUE'
51-
publish-logs: 'true'
44+
- name: Stuart Setup
45+
run: python Platforms/QemuSbsaPkg/PlatformBuild.py --setup
5246

53-
- name: Upload Firmware Binaries (artifacts)
54-
uses: actions/upload-artifact@v4
55-
with:
56-
# One artifact per matrix target so they don't overwrite each other
57-
name: haf-tfa-firmware
58-
if-no-files-found: error
59-
path: |
60-
Build/QemuSbsaPkg/DEBUG_GCC5/HafTfaBins/**
61-
retention-days: 14
47+
- name: Stuart Update
48+
run: python Platforms/QemuSbsaPkg/PlatformBuild.py --update
6249

63-
publish:
64-
name: Publish HAF/TFA Firmware Binaries
65-
needs: build
66-
if: github.event_name == 'release'
67-
runs-on: ubuntu-latest
50+
- name: Stuart Build
51+
run: python Platforms/QemuSbsaPkg/PlatformBuild.py HAF_TFA_BUILD=TRUE
6852

69-
permissions:
70-
contents: write
71-
72-
steps:
73-
- name: Checkout
74-
uses: actions/checkout@v4
75-
with:
76-
fetch-depth: 0
77-
78-
- name: Download Artifacts
79-
uses: actions/download-artifact@v4
80-
with:
81-
path: ${{ runner.temp }}/artifacts
53+
- name: Install archive tools
54+
if: github.event_name == 'release'
55+
run: |
56+
apt-get update -y
57+
apt-get install -y zip tar gh
8258
8359
- name: Create per-target archives
60+
if: github.event_name == 'release'
61+
shell: bash
8462
run: |
8563
set -euo pipefail
86-
cd "${RUNNER_TEMP}/artifacts"
87-
for d in */ ; do
88-
d="${d%/}"
89-
echo "Zipping $d ..."
90-
( cd "$d" && zip -r "${RUNNER_TEMP}/${d}-${{ github.event.release.tag_name }}.zip" . )
91-
( cd "$d" && tar -czf "${RUNNER_TEMP}/${d}-${{ github.event.release.tag_name }}.tar.gz" . )
92-
done
93-
echo "Done creating archives:"
94-
ls -lh "${RUNNER_TEMP}"/*.zip "${RUNNER_TEMP}"/*.tar.gz
64+
BIN_DIR="Build/QemuSbsaPkg/DEBUG_GCC5/HafTfaBins"
65+
echo "Packaging binaries from ${BIN_DIR}"
66+
if [ ! -d "$BIN_DIR" ]; then
67+
echo "Binary directory not found: $BIN_DIR" >&2
68+
exit 1
69+
fi
70+
ZIP_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.zip"
71+
TAR_PATH="${RUNNER_TEMP}/haf-tfa-firmware-${{ github.event.release.tag_name }}.tar.gz"
72+
(cd "$BIN_DIR" && zip -r "$ZIP_PATH" .)
73+
(cd "$BIN_DIR" && tar -czf "$TAR_PATH" .)
74+
echo "Created archives:"
75+
ls -lh "$ZIP_PATH" "$TAR_PATH"
9576
9677
- name: Upload Release Assets
78+
if: github.event_name == 'release'
9779
env:
9880
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9981
run: |

Platforms/QemuSbsaPkg/PlatformBuild.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,16 @@ def SetPlatformEnv(self):
316316
# Default turn on build reporting.
317317
self.env.SetValue("BUILDREPORTING", "TRUE", "Enabling build report")
318318
self.env.SetValue("BUILDREPORT_TYPES", "PCD DEPEX FLASH BUILD_FLAGS LIBRARY FIXED_ADDRESS HASH", "Setting build report types")
319-
self.env.SetValue("ARM_TFA_PATH", os.path.join (self.GetWorkspaceRoot (), "Silicon/Arm/TFA"), "Platform hardcoded")
320-
self.env.SetValue("ARM_HAF_PATH", os.path.join (self.GetWorkspaceRoot (), "Silicon/Arm/HAF"), "Platform hardcoded")
319+
self.env.SetValue("ARM_TFA_PATH", str(Path(self.GetWorkspaceRoot()) / "Silicon" / "Arm" / "TFA"), "Platform hardcoded")
320+
self.env.SetValue("ARM_HAF_PATH", str(Path(self.GetWorkspaceRoot()) / "Silicon" / "Arm" / "HAF"), "Platform hardcoded")
321321
self.env.SetValue("BLD_*_QEMU_CORE_NUM", "4", "Default")
322322
self.env.SetValue("BLD_*_MEMORY_PROTECTION", "TRUE", "Default")
323323
# Include the MFCI test cert by default, override on the commandline with "BLD_*_SHIP_MODE=TRUE" if you want the retail MFCI cert
324324
self.env.SetValue("BLD_*_SHIP_MODE", "FALSE", "Default")
325325
self.env.SetValue("CONF_AUTOGEN_INCLUDE_PATH", self.edk2path.GetAbsolutePathOnThisSystemFromEdk2RelativePath("QemuSbsaPkg", "Include"), "Platform Defined")
326326
self.env.SetValue("MU_SCHEMA_DIR", self.edk2path.GetAbsolutePathOnThisSystemFromEdk2RelativePath("QemuSbsaPkg", "CfgData"), "Platform Defined")
327327
self.env.SetValue("MU_SCHEMA_FILE_NAME", "QemuSbsaPkgCfgData.xml", "Platform Hardcoded")
328-
self.env.SetValue("HAF_TFA_BUILD", "TRUE", "Default to false when running locally")
328+
self.env.SetValue("HAF_TFA_BUILD", "TRUE", "Platform Hardcoded")
329329

330330
if self.Helper.generate_secureboot_pcds(self) != 0:
331331
logging.error("Failed to generate include PCDs")

0 commit comments

Comments
 (0)