Modify to my hardware #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NvStrapsReBar EDK2 | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
TARGET: RELEASE | |
TARGET_ARCH: X64 | |
jobs: | |
NvStrapsReBar-windows: | |
runs-on: windows-2019 | |
env: | |
TOOL_CHAIN_TAG: VS2019 | |
steps: | |
- uses: actions/[email protected] | |
- run: pip install pefile | |
- name: Support long filenames | |
run: git config --system core.longpaths true | |
# save nasm | |
- name: cache nasm | |
id: cache-nasm | |
uses: actions/cache@v3 | |
with: | |
path: C:\nasm | |
key: nasm-path | |
# edk2's setup script checks for nasm only at 'C:\nasm' so install it there | |
- name: install nasm | |
if: steps.cache-nasm.outputs.cache-hit != 'true' | |
shell: powershell | |
run: | | |
md C:\nasm | |
Invoke-WebRequest -Uri "https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/win64/nasm-2.15.05-win64.zip" -OutFile "C:\nasm\nasm.zip" | |
cd C:\nasm | |
7z e nasm.zip | |
- name: Download edk2 | |
uses: actions/checkout@v3 | |
with: | |
repository: 'tianocore/edk2' | |
ref: 'edk2-stable202208' | |
submodules: 'recursive' | |
- name: Download NvStrapsReBar | |
uses: actions/checkout@v3 | |
with: | |
path: '.\NvStrapsReBar\' | |
- name: Setup EDK2 | |
run: .\edksetup.bat Rebuild | |
- name: Build NvStrapsReBar | |
run: .\NvStrapsReBar\.github\workflows\buildffs.bat | |
- name: Upload NvStrapsReBar artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: NvStrapsReBar (built on Windows) | |
path: ${{github.workspace}}/Build/NvStrapsReBar/RELEASE_VS2019/X64/NvStrapsReBar.ffs | |
NvStrapsReBar-linux: | |
runs-on: ubuntu-22.04 | |
env: | |
TOOL_CHAIN_TAG: GCC5 | |
steps: | |
- uses: actions/[email protected] | |
- run: pip install pefile | |
- name: Download edk2 | |
uses: actions/checkout@v3 | |
with: | |
repository: 'tianocore/edk2' | |
ref: 'edk2-stable202208' | |
submodules: 'recursive' | |
path: '.' | |
- name: Download NvStrapsReBar | |
uses: actions/checkout@v3 | |
with: | |
path: './NvStrapsReBar/' | |
- name: Install dependencies | |
run: sudo apt install build-essential uuid-dev iasl git nasm python-is-python3 | |
- name: Build Base Tools | |
run: make -C ./BaseTools/ | |
- name: Setup EDK2 | |
run: bash -c "source edksetup.sh" | |
- name: Build NvStrapsReBar | |
run: ./NvStrapsReBar/.github/workflows/buildffs.sh | |
- name: Upload NvStrapsReBar artifact | |
uses: actions/upload-artifact@master | |
with: | |
name: NvStrapsReBar (built on Linux) | |
path: ${{github.workspace}}/Build/NvStrapsReBar/RELEASE_GCC5/X64/NvStrapsReBar.ffs |