|
| 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_AARCH64_PREFIX: aarch64-linux-gnu- |
| 14 | + GCC5_LOONGARCH64_PREFIX: loongarch64-unknown-linux-gnu- |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + arch: [X64, AARCH64, LOONGARCH64] |
| 23 | + include: |
| 24 | + - arch: X64 |
| 25 | + short: x64 |
| 26 | + pkgs: null |
| 27 | + - arch: AARCH64 |
| 28 | + short: aa64 |
| 29 | + pkgs: gcc-aarch64-linux-gnu |
| 30 | + - arch: LOONGARCH64 |
| 31 | + short: loongarch64 |
| 32 | + pkgs: null |
| 33 | + |
| 34 | + steps: |
| 35 | + - name: Checkout repository |
| 36 | + uses: actions/checkout@v4 |
| 37 | + |
| 38 | + - name: Install dependencies |
| 39 | + run: | |
| 40 | + sudo apt-get update |
| 41 | + sudo apt-get install -y build-essential uuid-dev iasl git nasm python3-distutils |
| 42 | + if [ -n "${{ matrix.pkgs }}" ]; then |
| 43 | + sudo apt-get install -y ${{ matrix.pkgs }} |
| 44 | + else |
| 45 | + echo "No additional packages for ${{ matrix.arch }}" |
| 46 | + fi |
| 47 | +
|
| 48 | + - name: Download and Install loongarch64 toolchain |
| 49 | + if: matrix.arch == 'loongarch64' |
| 50 | + run: | |
| 51 | + curl -L -O https://github.com/loongson/build-tools/releases/download/2024.11.01/x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz |
| 52 | + tar -xJf x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz |
| 53 | + echo "$PWD/cross-tools/bin" >> "$GITHUB_PATH" |
| 54 | +
|
| 55 | + - name: Build EDK2 Base Tools |
| 56 | + run: | |
| 57 | + git clone --recursive https://github.com/tianocore/edk2.git |
| 58 | + cd edk2 |
| 59 | + git submodule update --init --recursive |
| 60 | + . edksetup.sh |
| 61 | + make -C BaseTools |
| 62 | +
|
| 63 | + - name: Build AppPkg EFI |
| 64 | + run: | |
| 65 | + export PACKAGES_PATH=`pwd`/edk2:`pwd` |
| 66 | + export EDK2_LIBC_PATH=`pwd` |
| 67 | + cd edk2 |
| 68 | + source edksetup.sh |
| 69 | + build -a ${{ matrix.arch }} -b ${{ env.BUILD_TYPE }} -t ${{ env.COMPILER }} -p $EDK2_LIBC_PATH/StdLib/StdLib.dsc |
| 70 | + build -a ${{ matrix.arch }} -b ${{ env.BUILD_TYPE }} -t ${{ env.COMPILER }} -p $EDK2_LIBC_PATH/AppPkg/AppPkg.dsc |
0 commit comments