From: Jason Ish Date: Sun, 8 Jun 2025 20:33:34 +0000 (-0600) Subject: github-ci: add macos job X-Git-Tag: suricata-7.0.11~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc0e3d60036356aee02ff0ee310486a341218a87;p=thirdparty%2Fsuricata-verify.git github-ci: add macos job Mainly the make sure that changers to the runner don't cause issues. macOS is different enough from Linux to needs its own check. --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index f49c9d8cb..9960dce36 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -4,6 +4,10 @@ on: - push - pull_request +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: pcapng-check: @@ -150,3 +154,57 @@ jobs: - name: Running suricata-verify working-directory: suricata run: python3 ../run.py --quiet + + macos: + name: macOS + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + branch: + - master + - main-7.0.x + steps: + - name: Install dependencies + run: | + brew install \ + autoconf \ + automake \ + cbindgen \ + curl \ + hiredis \ + hwloc \ + jansson \ + jq \ + libmagic \ + libnet \ + libtool \ + libyaml \ + pcre2 \ + pkg-config \ + python \ + rust \ + xz + - uses: actions/checkout@v3 + - name: Create Python virtual environment + run: python3 -m venv ./testenv + - name: Install PyYAML + run: | + . ./testenv/bin/activate + pip install pyyaml + - run: | + . ./testenv/bin/activate + python3 ./run.py --self-test + - run: git clone https://github.com/OISF/suricata -b ${{ matrix.branch }} + - run: git clone https://github.com/OISF/libhtp suricata/libhtp + - name: Build Suricata + working-directory: suricata + run: | + ./autogen.sh + 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-warnings --enable-unittests --prefix="$HOME/.local/" + CPATH="$HOMEBREW_PREFIX/include:$CPATH" LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$LIBRARY_PATH" PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH" make -j2 + - name: Running suricata-verify + working-directory: suricata + run: | + . ../testenv/bin/activate + python3 ../run.py --quiet