Skip to content

Commit

Permalink
CI: add a workaround for macOS builders on GHA
Browse files Browse the repository at this point in the history
The GHA agents have installed capstone via brew.  Unfortunately, the
pkg-config data for the bottle provides an include path with an extra
component which we cannot reliably strip in the build system.  The
result is that `capstone/capstone.h` is not found.  Explicitly inject an
additional header search path from the command line to resolve the
header properly.
  • Loading branch information
compnerd committed Nov 11, 2022
1 parent 9920e5c commit ac8742f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ jobs:
fail-fast: false
matrix:
include:
- { cflags: "", cxxflags: "" }
- { cflags: "-fmodules", cxxflags: "-fmodules" }
- { cflags: "", cxxflags: "-I/usr/local/Cellar/capstone/4.0.2/include" }
- { cflags: "-fmodules", cxxflags: "-fmodules -I/usr/local/Cellar/capstone/4.0.2/include" }

steps:
- uses: seanmiddleditch/gha-setup-ninja@master
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
with:
path: ${{ github.workspace }}/bloaty
- name: configure
run: cmake -B build/bloaty -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_FLAGS=${{ matrix.cflags }} -D CMAKE_CXX_FLAGS=${{ matrix.cxxflags }} -G Ninja -S ${{ github.workspace }}/bloaty -D FILECHECK_EXECUTABLE=${{ github.workspace }}/build/llvm-project/bin/FileCheck -D YAML2OBJ_EXECUTABLE=${{ github.workspace }}/build/llvm-project/bin/yaml2obj -D LIT_EXECUTABLE=${{ github.workspace }}/llvm-project/llvm/utils/lit/lit.py
run: cmake -B build/bloaty -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_FLAGS="${{ matrix.cflags }}" -D CMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" -G Ninja -S ${{ github.workspace }}/bloaty -D FILECHECK_EXECUTABLE=${{ github.workspace }}/build/llvm-project/bin/FileCheck -D YAML2OBJ_EXECUTABLE=${{ github.workspace }}/build/llvm-project/bin/yaml2obj -D LIT_EXECUTABLE=${{ github.workspace }}/llvm-project/llvm/utils/lit/lit.py
- name: build
run: cmake --build build/bloaty --config Debug
- name: test
Expand Down

0 comments on commit ac8742f

Please sign in to comment.