Skip to content

Commit 710b521

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 710b521

File tree

1 file changed

+83
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)