Skip to content

Commit e2b2abf

Browse files
committed
edk2-libc: add github workflow to build app efi with GCC
Signed-off-by: Dongyan Qian <[email protected]>
1 parent f22e382 commit e2b2abf

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# GitHub actions workflow to build AppPkg EFI using gcc
2+
#
3+
# SPDX-License-Identifier: BSD-2-Clause-Patent
4+
#
5+
6+
---
7+
name: Build Project for AppPkg EFI with GCC
8+
9+
on:
10+
push: true
11+
pull_request: true
12+
13+
env:
14+
BUILD_TYPE: RELEASE
15+
COMPILER: GCC5
16+
GCC5_ARM_PREFIX: arm-linux-gnueabi-
17+
GCC5_AARCH64_PREFIX: aarch64-linux-gnu-
18+
GCC5_LOONGARCH64_PREFIX: loongarch64-unknown-linux-gnu-
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
24+
strategy:
25+
matrix:
26+
arch: [X64, IA32, AARCH64, ARM, LOONGARCH64]
27+
include:
28+
- arch: X64
29+
short: x64
30+
pkgs: null
31+
- arch: IA32
32+
short: ia32
33+
pkgs: gcc-multilib
34+
- arch: AARCH64
35+
short: aa64
36+
pkgs: gcc-aarch64-linux-gnu
37+
- arch: ARM
38+
short: arm
39+
pkgs: gcc-arm-linux-gnueabi
40+
- arch: LOONGARCH64
41+
short: loongarch64
42+
pkgs: null
43+
44+
steps:
45+
- name: Install dependencies
46+
run: |
47+
if [ -n "${{ matrix.pkgs }}" ]; then
48+
sudo apt-get update
49+
sudo apt-get install -y build-essential uuid-dev iasl git nasm python3-distutils
50+
sudo apt-get install -y ${{ matrix.pkgs }}
51+
else
52+
echo "No additional packages for ${{ matrix.arch }}"
53+
fi
54+
55+
- name: Download and Install loongarch64 toolchain
56+
run: |
57+
curl -L -O https://github.com/loongson/build-tools/releases/download/2024.11.01/
58+
x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz
59+
tar -xJf x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz
60+
echo "$PWD/cross-tools/bin" >> "$GITHUB_PATH"
61+
62+
- name: Build EDK2 Base Tools
63+
run: |
64+
git clone --recursive https://github.com/tianocore/edk2.git
65+
cd edk2
66+
git submodule update --init --recursive
67+
. edksetup.sh
68+
make -C BaseTools
69+
70+
- name: Checkout repository
71+
uses: actions/checkout@v4
72+
73+
- name: Build AppPkg EFI
74+
run: |
75+
export PACKAGES_PATH=`pwd`/edk2:`pwd`
76+
export EDK2_LIBC_PATH=`pwd`
77+
cd edk2
78+
source edksetup.sh
79+
build -a ${{ matrix.arch }} -b ${{ env.BUILD_TYPE }} -t ${{ env.COMPILER }} -p $EDK2_LIBC_PATH/AppPkg/AppPkg.dsc

0 commit comments

Comments
 (0)