Skip to content

Commit 857c54a

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 857c54a

File tree

1 file changed

+76
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)