This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.cirrus.yml
88 lines (70 loc) · 2.1 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
environment:
CCACHE_BASEDIR: $CIRRUS_WORKING_DIR
CCACHE_DIR: /tmp/ccache
CCACHE_COMPRESS: "1"
# Enforce sequential JIT'ing of files for controlled memory usage.
HILTI_JIT_SEQUENTIAL: "1"
# Cache JIT results.
HILTI_CXX_COMPILER_LAUNCHER: ccache
# Spicy branch to download artifact from.
SPICY_BRANCH: main
zkg_task:
timeout_in: 120m
container:
dockerfile: ci/Dockerfile
matrix:
- docker_arguments:
- ZEEK_VERSION: "v5.0.9"
- docker_arguments:
- ZEEK_VERSION: "v5.2.2"
cpu: 2
memory: 8G
ccache_cache:
folder: /tmp/ccache
fingerprint_script: echo $CIRRUS_TASK_NAME-$CIRRUS_OS
reupload_on_changes: true
install_spicy_script:
- ./ci/get-artifacts.sh "${SPICY_BRANCH}"
- dpkg --install spicy-dev.deb
- rm spicy-dev.deb
test_script:
- zkg test .
install_script:
# --force avoids prompts, --skiptests because tests ran already
- zkg install --force --skiptests .
check_script:
- zeek -N Zeek::Spicy
- zeek local
always:
stderr_script: ./ci/show-zkg-stderr
standalone_task:
timeout_in: 120m
container:
dockerfile: ci/Dockerfile
matrix:
- docker_arguments:
- ZEEK_VERSION: "v5.2.2"
cpu: 2
memory: 8G
always:
ccache_cache:
folder: /tmp/ccache
fingerprint_script: echo $CIRRUS_TASK_NAME-$CIRRUS_OS
reupload_on_changes: true
install_spicy_script:
- ./ci/get-artifacts.sh "${SPICY_BRANCH}"
- dpkg --install spicy-dev.deb
- rm spicy-dev.deb
build_script:
- (mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/spicy-plugin -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -G Ninja .. && ninja -j 2)
clang_tidy_script:
- (cd build && run-clang-tidy -j $(nproc) $(jq -r '.[].file | select(contains(".bif") | not)' <compile_commands.json ))
test_build_script:
- ZEEK_PLUGIN_PATH=$(pwd)/build zeek -N Zeek::Spicy
- make -C tests test
install_script:
- (cd build && ninja install)
- rm -rf build
test_install_script:
- zeek -N Zeek::Spicy
- PATH=/opt/spicy-plugin/bin:$PATH make -C tests test-install