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