mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Cirrus configuration for Windows builds
This commit is contained in:
parent
bf06cc9c2f
commit
2bdc8dd3a4
6 changed files with 53 additions and 7 deletions
22
.cirrus.yml
22
.cirrus.yml
|
@ -59,7 +59,7 @@ ci_template: &CI_TEMPLATE
|
|||
only_if: >
|
||||
( $CIRRUS_REPO_NAME != 'zeek-security' || $CIRRUS_OS != "darwin" ) &&
|
||||
( ( $CIRRUS_PR != '' && $CIRRUS_BRANCH !=~ 'dependabot/.*' ) ||
|
||||
( $CIRRUS_REPO_NAME == 'zeek' &&
|
||||
( $CIRRUS_REPO_NAME == 'ms-zeek' &&
|
||||
(
|
||||
$CIRRUS_BRANCH == 'master' ||
|
||||
$CIRRUS_BRANCH =~ 'release/.*'
|
||||
|
@ -357,3 +357,23 @@ ubsan_sanitizer_task:
|
|||
# CXXFLAGS: -DZEEK_DICT_DEBUG
|
||||
# ZEEK_CI_CONFIGURE_FLAGS: *TSAN_SANITIZER_CONFIG
|
||||
# ZEEK_CI_DISABLE_SCRIPT_PROFILING: 1
|
||||
|
||||
windows_task:
|
||||
# 2 hour timeout just for potential of building Docker image taking a while
|
||||
timeout_in: 120m
|
||||
windows_container:
|
||||
# image: cirrusci/windowsservercore:cmake
|
||||
# image: zeekurity/broker-ci-windows:latest
|
||||
dockerfile: ci/windows/Dockerfile
|
||||
os_version: 2019
|
||||
cpu: 8
|
||||
# Not allowed to request less than 8GB for an 8 CPU Windows VM.
|
||||
memory: 8GB
|
||||
sync_submodules_script: git submodule update --recursive --init
|
||||
prepare_script: ci/windows/prepare.cmd
|
||||
build_script: ci/windows/build.cmd
|
||||
test_script: ci/windows/test.cmd
|
||||
env:
|
||||
ZEEK_CI_CPUS: 8
|
||||
# Give verbose error output on a test failure.
|
||||
CTEST_OUTPUT_ON_FAILURE: 1
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
|||
# Ignore anything prefixed with build since people
|
||||
# tend to name all of their build directories prefixed that way.
|
||||
build*
|
||||
!ci/windows/build.cmd
|
||||
|
||||
tmp
|
||||
*.gcov
|
||||
|
|
|
@ -12,12 +12,12 @@ RUN [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePoin
|
|||
# Install prerequisites
|
||||
RUN choco install -y --no-progress visualstudio2019buildtools --version=16.11.11.0
|
||||
RUN choco install -y --no-progress visualstudio2019-workload-vctools --version=1.0.0 --package-parameters '--add Microsoft.VisualStudio.Component.VC.ATLMFC'
|
||||
RUN choco install conan -y
|
||||
RUN choco install sed -y
|
||||
RUN choco install winflexbison3 -y
|
||||
RUN choco install msysgit -y
|
||||
RUN choco install python -y
|
||||
RUN choco install openssl -y
|
||||
RUN choco install -y --no-progress conan
|
||||
RUN choco install -y --no-progress sed
|
||||
RUN choco install -y --no-progress winflexbison3
|
||||
RUN choco install -y --no-progress msysgit
|
||||
RUN choco install -y --no-progress python
|
||||
RUN choco install -y --no-progress openssl
|
||||
|
||||
# Set working environment.
|
||||
SHELL [ "cmd", "/c" ]
|
||||
|
|
11
ci/windows/build.cmd
Normal file
11
ci/windows/build.cmd
Normal file
|
@ -0,0 +1,11 @@
|
|||
:: Import the visual studio compiler environment into the one running in the
|
||||
:: cmd current shell. This path is hard coded to the one on the CI image, but
|
||||
:: can be adjusted if running builds locally. Unfortunately, the initial path
|
||||
:: isn't in the environment so we have to hardcode the whole path.
|
||||
call "c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake.exe .. -DCMAKE_BUILD_TYPE=release -DENABLE_ZEEK_UNIT_TESTS=yes -G Ninja
|
||||
cmake.exe --build .
|
7
ci/windows/prepare.cmd
Normal file
7
ci/windows/prepare.cmd
Normal file
|
@ -0,0 +1,7 @@
|
|||
@echo on
|
||||
|
||||
echo %ZEEK_CI_CPUS%
|
||||
wmic cpu get NumberOfCores, NumberOfLogicalProcessors/Format:List
|
||||
systeminfo
|
||||
dir C:
|
||||
choco list --localonly
|
7
ci/windows/test.cmd
Normal file
7
ci/windows/test.cmd
Normal file
|
@ -0,0 +1,7 @@
|
|||
:: See build.cmd for documentation on this call.
|
||||
call "c:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64
|
||||
|
||||
:: We currently don't have any tests to run on Windows, so this is just commented out.
|
||||
:: We'll expand on this later.
|
||||
:: cd build
|
||||
:: ctest -C release || exit \b 1
|
Loading…
Add table
Add a link
Reference in a new issue