Skip to content

version 1.10

version 1.10 #48

name: Windows, MSVC, EDK2
on:
push:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '!set_grub_cpu.cmd'
- '**.md'
- '**.sh'
- '!set_grub_cpu.sh'
- '**.txt'
- '**.vbs'
pull_request:
paths-ignore:
- '.gitignore'
- '.gitattributes'
- '**.cmd'
- '!set_grub_cpu.cmd'
- '**.md'
- '**.sh'
- '!set_grub_cpu.sh'
- '**.txt'
- '**.vbs'
env:
BUILD_TYPE: RELEASE
COMPILER: VS2019
NASM_URL: https://www.nasm.us/pub/nasm/releasebuilds/2.16/win64/nasm-2.16-win64.zip
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [X64, IA32, AARCH64, ARM]
include:
- arch: X64
short: x64
msvc: amd64
- arch: IA32
short: ia32
msvc: amd64_x86
- arch: AARCH64
short: aa64
msvc: amd64_arm64
- arch: ARM
short: arm
msvc: amd64_arm
steps:
- name: Set up environment variables
shell: cmd
run: |
for /F "tokens=* USEBACKQ" %%f in (`where python.exe`) do (set PYTHON_HOME=%%f)
echo PYTHON_HOME=%PYTHON_HOME%>> %GITHUB_ENV%
curl -L ${{ env.NASM_URL }} -o nasm.zip
7z x nasm.zip
del nasm.zip
move nasm* nasm
echo NASM_PREFIX=%cd%\nasm\>> %GITHUB_ENV%
- name: Set Visual Studio for win32 build
uses: ilammy/msvc-dev-cmd@v1
with:
arch: win32
- name: Set up EDK2
shell: cmd
run: |
git clone --recursive https://github.com/tianocore/edk2.git
cd edk2
call edksetup.bat rebuild
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
path: edk2/EfiFsPkg
- name: Patch GRUB
run: |
cd edk2\EfiFsPkg\grub
git apply ..\0001-GRUB-fixes.patch
- name: Set Visual Studio for ${{ matrix.msvc }} build
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.msvc }}
- name: Build UEFI drivers
shell: cmd
run: |
cd edk2
call edksetup.bat reconfig
call EfiFsPkg\set_grub_cpu.cmd ${{ matrix.arch }}
call build -a ${{ matrix.arch }} -b ${{ env.BUILD_TYPE }} -t ${{ env.COMPILER }} -p EfiFsPkg/EfiFsPkg.dsc
for %%f in (Build\EfiFs\${{ env.BUILD_TYPE }}_${{ env.COMPILER }}\${{ matrix.arch }}\*.efi) do ren "%%~f" "%%~nf_${{ matrix.short }}%%~xf"
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: msvc_edk2_${{ matrix.short }}
path: edk2/Build/EfiFs/${{ env.BUILD_TYPE }}_${{ env.COMPILER }}/${{ matrix.arch }}/*.efi
merge-artifacts:
runs-on: ubuntu-latest
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: msvc_edk2
delete-merged: true