diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6946d93b..b70ec268 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - zeek: [{version: 4.0.4-0, tag: -lts}, {version: 5.0.0-0, tag: -rc}] + zeek: [{version: 5.0.9-0, tag: -lts}] env: ZEEK_VERSION: ${{ matrix.zeek.version }} @@ -25,17 +25,17 @@ jobs: - name: Install Zeek run: | - (cd /tmp && curl -L -O https://download.zeek.org/binary-packages/xUbuntu_20.04/amd64/zeek${ZEEK_TAG}-core_${ZEEK_VERSION}_amd64.deb) + (cd /tmp && curl -L -O https://download.zeek.org/binary-packages/xUbuntu_22.04/amd64/zeek${ZEEK_TAG}-core_${ZEEK_VERSION}_amd64.deb) sudo apt install -y /tmp/zeek${ZEEK_TAG}-core_${ZEEK_VERSION}_amd64.deb echo "/opt/zeek/bin:$PATH" >> $GITHUB_PATH - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2 with: key: ${{ github.job }} @@ -54,7 +54,7 @@ jobs: # TODO: tidy fails in Broker currently # ninja -C build tidy - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 if: failure() with: name: Test output @@ -78,12 +78,12 @@ jobs: pip3 install btest zkg - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2 with: key: ${{ github.job }} @@ -107,30 +107,36 @@ jobs: ninja -C build package (cd build/dist && echo "ZA_DIST=$(echo *.tar.gz)" >>$GITHUB_ENV) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{env.ZA_DIST}} path: build/dist/${{env.ZA_DIST}} # TODO: Install Zeek and run Zeek tests. - release_macos_11: - runs-on: macos-11 + release_macos_13: + runs-on: macos-13 environment: ${{ (github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-dev'))) && 'release' || '' }} steps: - name: Prepare run: | + brew update + brew unlink python + brew link --overwrite python + brew upgrade --force python + brew upgrade --force php + brew upgrade brew install ninja ccache pip3 install btest zkg - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2 with: key: ${{ github.job }} @@ -207,7 +213,7 @@ jobs: ### Back to running on all branches - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{env.ZA_DIST}} path: build/dist/${{env.ZA_DIST}} @@ -226,7 +232,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive @@ -244,7 +250,7 @@ jobs: shell: cmd - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2 with: key: ${{ github.job }} @@ -267,7 +273,7 @@ jobs: - name: Configure run: > - cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_MAKE_PROGRAM=ninja.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CCACHE=yes -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} + cmake -S . -B build -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_MAKE_PROGRAM=ninja.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DUSE_CCACHE=yes -DCMAKE_TOOLCHAIN_FILE="3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} shell: cmd - name: Build @@ -290,7 +296,7 @@ jobs: (cd build/dist && echo "ZA_DIST=$(echo *.msi)" >>$GITHUB_ENV) shell: bash - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{env.ZA_DIST}} path: build/dist/${{env.ZA_DIST}} @@ -307,12 +313,12 @@ jobs: sudo apt-get install -y ninja-build ccache curl ca-certificates - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up ccache - uses: hendrikmuhs/ccache-action@v1.2.2 + uses: hendrikmuhs/ccache-action@v1.2 with: key: ${{ github.job }} @@ -331,7 +337,7 @@ jobs: cat build/dist/${{env.ZA_DIST}} | (cd ${{ runner.temp }}/test-build && tar xzvf -) (cd $(echo ${{ runner.temp }}/test-build/zeek-agent*) && ./configure --generator=Ninja --enable-ccache && ninja -C build && ninja -C build test) - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{env.ZA_DIST}} path: build/dist/${{env.ZA_DIST}} @@ -341,10 +347,10 @@ jobs: contents: write runs-on: ubuntu-latest if: (startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-dev')) - needs: [debug_ubuntu_latest, release_alpine_3_15_static, release_macos_11, release_windows_2022, release_source] + needs: [debug_ubuntu_latest, release_alpine_3_15_static, release_macos_13, release_windows_2022, release_source] steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive @@ -353,7 +359,7 @@ jobs: cat CHANGES | awk '/^[0-9]+\./{ n++; next; } n < 2 { print }' >${{ runner.temp }}/release-msg echo "release_name=$(echo ${{ github.ref_name }} | sed 's/^v//')" >> $GITHUB_ENV - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: path: artifacts diff --git a/3rdparty/doctest b/3rdparty/doctest index 4d8716f1..ae7a1353 160000 --- a/3rdparty/doctest +++ b/3rdparty/doctest @@ -1 +1 @@ -Subproject commit 4d8716f1efc1d14aa736ef52ee727bd4204f4c40 +Subproject commit ae7a13539fb71f270b87eb2e874fbac80bc8dda2 diff --git a/3rdparty/vcpkg b/3rdparty/vcpkg index cef0b3ec..a42af01b 160000 --- a/3rdparty/vcpkg +++ b/3rdparty/vcpkg @@ -1 +1 @@ -Subproject commit cef0b3ec767df6e83806899fe9525f6cf8d7bc91 +Subproject commit a42af01b72c28a8e1d7b48107b33e4f286a55ef6 diff --git a/README.md b/README.md index b3f9a03f..a5784f85 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,13 @@ Selected `configure` options (see `--help` for more): On macOS with Homebrew, use `--with-openssl={/usr/local,/opt/homebrew}/opt/openssl@1.1` +##### Windows + +For Windows builds, any recent version of Visual Studio will work. You will need +to pass `-DCMAKE_TOOLCHAIN_FILE="3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake"` +to the CMake invocation. This will make vcpkg install the proper dependencies for +the build. + #### Usage On all endpoints, run as `root`: diff --git a/vcpkg.json b/vcpkg.json index 8ad6fe08..288bd24b 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -2,6 +2,7 @@ "name": "main", "version-string": "latest", "dependencies": [ + "pthreads", "openssl", "zlib" ]