-
Notifications
You must be signed in to change notification settings - Fork 129
84 lines (70 loc) · 2.53 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Linux (gcc with EDK2) build
on: [push, pull_request]
env:
BUILD_TYPE: RELEASE
GCC5_ARM_PREFIX: arm-linux-gnueabi-
GCC5_AARCH64_PREFIX: aarch64-linux-gnu-
GCC5_RISCV64_PREFIX: riscv64-linux-gnu-
jobs:
Linux-EDK2-Build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- TARGET_TYPE: x64
TARGET_ARCH: X64
TARGET_PKGS: python3-distutils nasm uuid-dev
- TARGET_TYPE: ia32
TARGET_ARCH: IA32
TARGET_PKGS: gcc-multilib python3-distutils nasm uuid-dev
- TARGET_TYPE: aa64
TARGET_ARCH: AARCH64
TARGET_PKGS: gcc-aarch64-linux-gnu python3-distutils uuid-dev
- TARGET_TYPE: arm
TARGET_ARCH: ARM
TARGET_PKGS: gcc-arm-linux-gnueabi python3-distutils uuid-dev
- TARGET_TYPE: riscv64
TARGET_ARCH: RISCV64
TARGET_PKGS: gcc-riscv64-linux-gnu python3-distutils uuid-dev
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set version
id: set_version
# NB: The following only works if the shell is bash
run: echo "version=$(git describe --tags)" >> $GITHUB_OUTPUT
- name: Create version.h file
run: |
git update-index --skip-worktree version.h
echo '#define VERSION_STRING L"${{steps.set_version.outputs.version}}"' > version.h
- name: Set up Linux environment
run: sudo apt install -y ${{matrix.TARGET_PKGS}}
- name: Fix missing Risc-V header
if: matrix.TARGET_TYPE == 'riscv64'
run: sudo ln -s /usr/riscv64-linux-gnu/include/gnu/stubs-lp64d.h /usr/riscv64-linux-gnu/include/gnu/stubs-lp64.h
- name: Set up EDK2
run: |
git clone --recursive https://github.com/tianocore/edk2.git
make -C edk2/BaseTools
- name: Build UEFI bootloader
run: |
export WORKSPACE=$PWD
export PACKAGES_PATH=$WORKSPACE:$WORKSPACE/edk2
source edk2/edksetup.sh
build -a ${{matrix.TARGET_ARCH}} -b ${BUILD_TYPE} -t GCC5 -p uefi-ntfs.dsc
mv $WORKSPACE/Build/${BUILD_TYPE}_GCC5/${{matrix.TARGET_ARCH}}/uefi-ntfs.efi $WORKSPACE/boot${{matrix.TARGET_TYPE}}.efi
- name: Display SHA-256
run: sha256sum *.efi
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: uefi-ntfs
path: ./*.efi
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{secrets.GITHUB_TOKEN}}
files: ./*.efi