Skip to content

Build/release Zeek

Build/release Zeek #46

Workflow file for this run

name: Build/release Zeek
on:
pull_request:
push:
branches:
- main
tags:
- v*brim*
workflow_dispatch:
permissions:
contents: write
jobs:
release:
strategy:
matrix:
platform: [windows-2019]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout build-zeek
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Checkout zeek
uses: actions/checkout@v3
with:
repository: zeek/zeek
ref: v6.0.2
fetch-depth: 1
submodules: recursive
path: zeek-src
- name: Build zeekrunner (Windows)
if: startsWith(matrix.platform, 'windows-')
run: go build -o zeekrunner.exe zeekrunner.go
- uses: actions/cache@v3
with:
path: ${{runner.temp}}/.ccache
key: ${{ runner.os }}-ccache
- name: Build Zeek (Windows)
if: startsWith(matrix.platform, 'windows-')
run: |
choco install -y --no-progress conan --version=1.58.0
choco install -y --no-progress winflexbison3
choco install -y --no-progress ccache
call refreshenv
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
sed -i -e /\[requires]/a^
libmaxminddb/1.9.1 zeek-src\windows\conanfile_windows.txt
mkdir zeek-src\build
cd zeek-src\build
cmake.exe .. -DCMAKE_BUILD_TYPE=release -DENABLE_ZEEK_UNIT_TESTS=yes -D CMAKE_INSTALL_PREFIX="C:\Program Files\Git\usr\local\zeek" -G Ninja
cmake.exe --build .
cmake.exe --install .
cd
shell: cmd
env:
CCACHE_DIR: ${{runner.temp}}/.ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache