Skip to content

Commit fd7e16f

Browse files
committed
Add building compile_commands.json to CI
I use compile_commands.json with vim all the time, so it's better if it doesn't break. This adds it to CI builds to try to ensure that better. Signed-off-by: Peter Jones <[email protected]>
1 parent 0c9249d commit fd7e16f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pullrequest.yml

+38
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,41 @@ jobs:
182182
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
183183
echo 'results:'
184184
find /destdir -type f
185+
186+
build-pull-request-intel-compile-commands-json:
187+
runs-on: ubuntu-20.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

0 commit comments

Comments
 (0)