| 1 |
name: pull-request |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
jobs: |
| 12 |
cross-build-pull-request: |
| 13 |
runs-on: ubuntu-24.04 |
| 14 |
container: vathpela/efi-ci:${{ matrix.distro }}-x64 |
| 15 |
name: ${{ matrix.distro }} ${{ matrix.efiarch }} cross-build |
| 16 |
|
| 17 |
strategy: |
| 18 |
fail-fast: false |
| 19 |
matrix: |
| 20 |
include: |
| 21 |
- arch: amd64 |
| 22 |
efiarch: aa64 |
| 23 |
gccarch: aarch64 |
| 24 |
makearch: aarch64 |
| 25 |
distro: f41 |
| 26 |
- arch: amd64 |
| 27 |
efiarch: aa64 |
| 28 |
gccarch: aarch64 |
| 29 |
makearch: aarch64 |
| 30 |
distro: f40 |
| 31 |
- arch: amd64 |
| 32 |
efiarch: arm |
| 33 |
gccarch: arm |
| 34 |
makearch: arm |
| 35 |
distro: f41 |
| 36 |
- arch: amd64 |
| 37 |
efiarch: arm |
| 38 |
gccarch: arm |
| 39 |
makearch: arm |
| 40 |
distro: f40 |
| 41 |
- arch: amd64 |
| 42 |
efiarch: arm |
| 43 |
gccarch: arm |
| 44 |
makearch: arm |
| 45 |
distro: f39 |
| 46 |
- arch: amd64 |
| 47 |
efiarch: x64 |
| 48 |
gccarch: x86_64 |
| 49 |
makearch: x86_64 |
| 50 |
distro: f41 |
| 51 |
- arch: amd64 |
| 52 |
efiarch: x64 |
| 53 |
gccarch: x86_64 |
| 54 |
makearch: x86_64 |
| 55 |
distro: f40 |
| 56 |
- arch: amd64 |
| 57 |
efiarch: x64 |
| 58 |
gccarch: x86_64 |
| 59 |
makearch: x86_64 |
| 60 |
distro: f39 |
| 61 |
- arch: amd64 |
| 62 |
efiarch: ia32 |
| 63 |
gccarch: x86_64 |
| 64 |
makearch: ia32 |
| 65 |
distro: f41 |
| 66 |
- arch: amd64 |
| 67 |
efiarch: ia32 |
| 68 |
gccarch: x86_64 |
| 69 |
makearch: ia32 |
| 70 |
distro: f40 |
| 71 |
- arch: amd64 |
| 72 |
efiarch: ia32 |
| 73 |
gccarch: x86_64 |
| 74 |
makearch: ia32 |
| 75 |
distro: f39 |
| 76 |
|
| 77 |
steps: |
| 78 |
- name: Checkout |
| 79 |
uses: actions/checkout@v4 |
| 80 |
with: |
| 81 |
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) |
| 82 |
ref: ${{ github.event.pull_request.head.sha }} |
| 83 |
fetch-depth: 0 |
| 84 |
submodules: recursive |
| 85 |
- name: Work around directory ownership issue |
| 86 |
id: ignore-ownership |
| 87 |
run: | |
| 88 |
git config --global --add safe.directory /__w/shim/shim |
| 89 |
- name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 90 |
id: update-submodules |
| 91 |
run: | |
| 92 |
make update |
| 93 |
- name: Make a build directory for ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 94 |
id: builddir |
| 95 |
run: | |
| 96 |
rm -rf build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 97 |
mkdir build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 98 |
cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 99 |
- name: Do the build on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 100 |
id: build |
| 101 |
run: | |
| 102 |
pwd |
| 103 |
cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 104 |
make TOPDIR=.. -f ../Makefile CROSS_COMPILE=${{ matrix.gccarch }}-linux-gnu- ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true all |
| 105 |
- name: Install on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 106 |
id: install |
| 107 |
run: | |
| 108 |
pwd |
| 109 |
cd build-${{ matrix.distro }}-${{ matrix.efiarch }} |
| 110 |
make TOPDIR=.. -f ../Makefile CROSS_COMPILE=${{ matrix.gccarch }}-linux-gnu- ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install |
| 111 |
echo 'results:' |
| 112 |
find /destdir -type f |
| 113 |
|
| 114 |
build-pull-request-intel: |
| 115 |
runs-on: ubuntu-24.04 |
| 116 |
container: vathpela/efi-ci:${{ matrix.distro }}-x64 |
| 117 |
name: ${{ matrix.distro }} ${{ matrix.efiarch }} build |
| 118 |
|
| 119 |
strategy: |
| 120 |
matrix: |
| 121 |
include: |
| 122 |
- arch: amd64 |
| 123 |
efiarch: x64 |
| 124 |
makearch: x86_64 |
| 125 |
distro: f41 |
| 126 |
- arch: amd64 |
| 127 |
efiarch: x64 |
| 128 |
makearch: x86_64 |
| 129 |
distro: f40 |
| 130 |
- arch: amd64 |
| 131 |
efiarch: x64 |
| 132 |
makearch: x86_64 |
| 133 |
distro: f39 |
| 134 |
- arch: amd64 |
| 135 |
efiarch: x64 |
| 136 |
makearch: x86_64 |
| 137 |
distro: centos9 |
| 138 |
- arch: amd64 |
| 139 |
efiarch: x64 |
| 140 |
makearch: x86_64 |
| 141 |
distro: centos8 |
| 142 |
- arch: amd64 |
| 143 |
efiarch: ia32 |
| 144 |
makearch: ia32 |
| 145 |
distro: f39 |
| 146 |
- arch: amd64 |
| 147 |
efiarch: ia32 |
| 148 |
makearch: ia32 |
| 149 |
distro: centos8 |
| 150 |
|
| 151 |
steps: |
| 152 |
- name: Checkout |
| 153 |
uses: actions/checkout@v4 |
| 154 |
with: |
| 155 |
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) |
| 156 |
ref: ${{ github.event.pull_request.head.sha }} |
| 157 |
fetch-depth: 0 |
| 158 |
submodules: recursive |
| 159 |
- name: Work around directory ownership issue |
| 160 |
id: ignore-ownership |
| 161 |
run: | |
| 162 |
git config --global --add safe.directory /__w/shim/shim |
| 163 |
- name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 164 |
id: update-submodules |
| 165 |
run: | |
| 166 |
make update |
| 167 |
- name: Do 'make clean' on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 168 |
id: clean |
| 169 |
run: | |
| 170 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean |
| 171 |
- name: Run tests on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 172 |
id: test |
| 173 |
run: | |
| 174 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true test |
| 175 |
- name: Do the build on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 176 |
id: build |
| 177 |
run: | |
| 178 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true all |
| 179 |
- name: Install on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 180 |
id: install |
| 181 |
run: | |
| 182 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install |
| 183 |
echo 'results:' |
| 184 |
find /destdir -type f |
| 185 |
|
| 186 |
build-pull-request-intel-compile-commands-json: |
| 187 |
runs-on: ubuntu-24.04 |
| 188 |
container: vathpela/efi-ci:${{ matrix.distro }}-x64 |
| 189 |
name: ${{ matrix.distro }} ${{ matrix.efiarch }} build compile_commands.json |
| 190 |
|
| 191 |
strategy: |
| 192 |
matrix: |
| 193 |
include: |
| 194 |
- arch: amd64 |
| 195 |
efiarch: x64 |
| 196 |
makearch: x86_64 |
| 197 |
distro: f41 |
| 198 |
|
| 199 |
steps: |
| 200 |
- name: Checkout |
| 201 |
uses: actions/checkout@v4 |
| 202 |
with: |
| 203 |
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger) |
| 204 |
ref: ${{ github.event.pull_request.head.sha }} |
| 205 |
fetch-depth: 0 |
| 206 |
submodules: recursive |
| 207 |
- name: Work around directory ownership issue |
| 208 |
id: ignore-ownership |
| 209 |
run: | |
| 210 |
git config --global --add safe.directory /__w/shim/shim |
| 211 |
- name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 212 |
id: update-submodules |
| 213 |
run: | |
| 214 |
make update |
| 215 |
- name: Do 'make clean' on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 216 |
id: clean |
| 217 |
run: | |
| 218 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean |
| 219 |
- name: Build compile_commands.json on ${{ matrix.distro }} for ${{ matrix.efiarch }} |
| 220 |
id: compile_commands |
| 221 |
run: | |
| 222 |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true compile_commands.json |