forked from tuxera/ntfs-3g
-
Notifications
You must be signed in to change notification settings - Fork 12
105 lines (91 loc) · 3.54 KB
/
uefi-driver_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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: UEFI driver - 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-
GCC5_LOONGARCH64_PREFIX: loongarch64-unknown-linux-gnu-
LOONGARCH64_TOOLCHAIN_TAG: 2024.11.01
LOONGARCH64_TOOLCHAIN_NAME: x86_64-cross-tools-loongarch64-binutils_2.43.1-gcc_14.2.0-glibc_2.40.tar.xz
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
arch: [X64, IA32, AARCH64, ARM, RISCV64, LOONGARCH64]
include:
- arch: X64
short: x64
pkgs: nasm python3-setuptools uuid-dev
- arch: IA32
short: ia32
pkgs: gcc-multilib nasm python3-setuptools uuid-dev
- arch: AARCH64
short: aa64
pkgs: gcc-aarch64-linux-gnu python3-setuptools uuid-dev
- arch: ARM
short: arm
pkgs: gcc-arm-linux-gnueabi python3-setuptools uuid-dev
- arch: RISCV64
short: riscv64
pkgs: gcc-riscv64-linux-gnu python3-setuptools uuid-dev
- arch: LOONGARCH64
short: loongarch64
pkgs: gcc-multilib python3-setuptools uuid-dev
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
id: set_version
run: echo "version=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: Install toolchain
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.pkgs }}
if [[ "${{ matrix.arch }}" == "LOONGARCH64" ]]; then
curl -L -O https://github.com/loongson/build-tools/releases/download/${LOONGARCH64_TOOLCHAIN_TAG}/${LOONGARCH64_TOOLCHAIN_NAME}
tar -xJf ${LOONGARCH64_TOOLCHAIN_NAME}
echo "$PWD/cross-tools/bin" >> "$GITHUB_PATH"
fi
- name: Fix missing Risc-V header
if: matrix.arch == '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 drivers
run: |
export WORKSPACE=$PWD
export PACKAGES_PATH=$WORKSPACE:$WORKSPACE/edk2
source edk2/edksetup.sh
build -a ${{ matrix.arch }} -b ${BUILD_TYPE} -t GCC5 -p uefi-driver.dsc -D FORCE_READONLY -D COMMIT_INFO=${GITHUB_SHA:0:8} -D DRIVER_VERSION=${{ steps.set_version.outputs.version }}
mv $WORKSPACE/Build/${BUILD_TYPE}_GCC5/${{ matrix.arch }}/ntfs.efi $WORKSPACE/ntfs_${{ matrix.short }}_ro.efi
build -a ${{ matrix.arch }} -b ${BUILD_TYPE} -t GCC5 -p uefi-driver.dsc -D COMMIT_INFO=${GITHUB_SHA:0:8} -D DRIVER_VERSION=${{ steps.set_version.outputs.version }}
mv $WORKSPACE/Build/${BUILD_TYPE}_GCC5/${{ matrix.arch }}/ntfs.efi $WORKSPACE/ntfs_${{ matrix.short }}.efi
- name: Display SHA-256
run: sha256sum *.efi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: uefi-driver_${{ matrix.short }}
path: ./*.efi
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./*.efi
merge-artifacts:
runs-on: ubuntu-24.04
needs: build
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: uefi-driver
delete-merged: true