Skip to content

Commit

Permalink
ci: fix macos build
Browse files Browse the repository at this point in the history
use brew instead of pip
limit the number of jobs for make
set a prefix where we can install
use brew flags for library finding

(cherry picked from commit 47a1502)
  • Loading branch information
catenacyber committed May 23, 2024
1 parent d519f74 commit 8456ad2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,7 @@ jobs:
libnet \
libtool \
libyaml \
pyyaml \
lua \
nss \
nspr \
Expand All @@ -1352,7 +1353,6 @@ jobs:
- name: Install cbindgen
run: cargo install --force --debug --version 0.14.1 cbindgen
- run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- run: pip3 install PyYAML
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Downloading prep archive
uses: actions/download-artifact@v2
Expand All @@ -1362,8 +1362,8 @@ jobs:
- run: tar xvf prep/libhtp.tar.gz
- run: tar xvf prep/suricata-update.tar.gz
- run: ./autogen.sh
- run: CFLAGS="${DEFAULT_CFLAGS}" CPPFLAGS="-I/usr/local/opt/libiconv/include" CXXFLAGS="-I/usr/local/opt/libiconv/include" LDFLAGS="-L/usr/local/opt/libiconv/lib" ./configure --enable-unittests
- run: make -j2
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" ./configure --enable-unittests --prefix="$HOME/.local/"
- run: CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" CFLAGS="${DEFAULT_CFLAGS}" make -j2
# somehow it gets included by some C++ stdlib header (case unsensitive)
- run: rm libhtp/VERSION && make check
- run: tar xf prep/suricata-verify.tar.gz
Expand Down

0 comments on commit 8456ad2

Please sign in to comment.