Build/release Zeek #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Zeek release | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
required: true | |
type: string | |
jobs: | |
release: | |
strategy: | |
matrix: | |
platform: [macos-12, ubuntu-20.04, windows-2019] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout build-zeek | |
uses: actions/checkout@v3 | |
- name: Checkout zeek | |
uses: actions/checkout@v3 | |
with: | |
repository: zeek/zeek | |
ref: ${{ inputs.tag }} | |
fetch-depth: 1 | |
submodules: recursive | |
path: zeek | |
- name: Setup Go (Windows) | |
if: startsWith(matrix.platform, 'windows-') | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: Build zeekrunner (Windows) | |
if: startsWith(matrix.platform, 'windows-') | |
run: go build -o zeekrunner.exe zeekrunner.go | |
- 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 | |
call refreshenv | |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 | |
mkdir zeek/build | |
cd zeek/build | |
cmake.exe .. -DCMAKE_BUILD_TYPE=release -DENABLE_ZEEK_UNIT_TESTS=yes -D CMAKE_INSTALL_PREFIX=/usr/local/zeek -G Ninja | |
cmake.exe --build . | |
cmake.exe --install . | |
shell: cmd | |
- name: Install dependencies (Linux) | |
if: startsWith(matrix.platform, 'ubuntu-') | |
run: apt install cmake make gcc g++ flex libfl-dev bison libpcap-dev libssl-dev python3 python3-dev swig zlib1g-dev | |
- name: Install dependencies (macOS) | |
if: startsWith(matrix.platform, 'macos-') | |
run: brew install cmake swig openssl bison flex | |
- name: Build Zeek (non-Windows) | |
if: "!startsWith(matrix.platform, 'windows-')" | |
run: | | |
cd zeek | |
./configure | |
make | |
make install |