Skip to content

Commit

Permalink
Add building compile_commands.json to CI
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
vathpela committed Dec 17, 2024
1 parent a904a68 commit 9a93dff
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,41 @@ jobs:
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true install
echo 'results:'
find /destdir -type f
build-pull-request-intel-compile-commands-json:
runs-on: ubuntu-20.04
container: vathpela/efi-ci:${{ matrix.distro }}-x64
name: ${{ matrix.distro }} ${{ matrix.efiarch }} build compile_commands.json

strategy:
matrix:
include:
- arch: amd64
efiarch: x64
makearch: x86_64
distro: f41

steps:
- name: Checkout
uses: actions/checkout@v4
with:
# otherwise we are testing target branch instead of the PR branch (see pull_request_target trigger)
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: recursive
- name: Work around directory ownership issue
id: ignore-ownership
run: |
git config --global --add safe.directory /__w/shim/shim
- name: Update submodules on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: update-submodules
run: |
make update
- name: Do 'make clean' on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: clean
run: |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true clean
- name: Run tests on ${{ matrix.distro }} for ${{ matrix.efiarch }}
id: test
run: |
make ARCH=${{ matrix.makearch }} PREFIX=/usr DESTDIR=/destdir EFIDIR=test ENABLE_SHIM_HASH=true compile_commands.json

0 comments on commit 9a93dff

Please sign in to comment.