10
10
description : The Falco version to use when building packages
11
11
required : true
12
12
type : string
13
- build_type :
14
- description : The build type
13
+ enable_debug :
14
+ description : Also create a debug build
15
15
required : false
16
- type : string
17
- default : ' Release '
18
- sanitizers :
19
- description : enable sanitizer support
16
+ type : boolean
17
+ default : false
18
+ enable_sanitizers :
19
+ description : Also create a sanitizer build
20
20
required : false
21
21
type : boolean
22
22
default : false
51
51
path : skeleton-build/skel_dir/bpf_probe.skel.h
52
52
retention-days : 1
53
53
54
- build-packages :
54
+ build-packages-release :
55
55
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
56
56
runs-on : ${{ (inputs.arch == 'aarch64' && 'oracle-aarch64-4cpu-16gb') || 'ubuntu-latest' }}
57
57
needs : [build-modern-bpf-skeleton]
@@ -78,14 +78,13 @@ jobs:
78
78
# Jemalloc and ASAN don't play very well together.
79
79
run : |
80
80
cmake -B build -S . \
81
- -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
81
+ -DCMAKE_BUILD_TYPE=Release \
82
82
-DUSE_BUNDLED_DEPS=On \
83
83
-DFALCO_ETC_DIR=/etc/falco \
84
84
-DMODERN_BPF_SKEL_DIR=/tmp \
85
85
-DBUILD_DRIVER=Off \
86
86
-DBUILD_BPF=Off \
87
- -DUSE_ASAN=${{ (inputs.sanitizers == true && inputs.arch == 'x86_64' && 'ON') || 'OFF' }} \
88
- -DUSE_JEMALLOC=${{ (inputs.sanitizers == true && inputs.arch == 'x86_64' && 'OFF') || 'ON' }} \
87
+ -DUSE_JEMALLOC=ON \
89
88
-DFALCO_VERSION=${{ inputs.version }}
90
89
91
90
- name : Build project
@@ -99,25 +98,123 @@ jobs:
99
98
- name : Upload Falco tar.gz package
100
99
uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
101
100
with :
102
- name : falco-${{ inputs.version }}-${{ inputs.arch }}${{ inputs.sanitizers == true && '-sanitizers' || '' }} .tar.gz
101
+ name : falco-${{ inputs.version }}-${{ inputs.arch }}.tar.gz
103
102
path : |
104
103
${{ github.workspace }}/build/falco-*.tar.gz
105
104
106
105
- name : Upload Falco deb package
107
106
uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
108
107
with :
109
- name : falco-${{ inputs.version }}-${{ inputs.arch }}${{ inputs.sanitizers == true && '-sanitizers' || '' }} .deb
108
+ name : falco-${{ inputs.version }}-${{ inputs.arch }}.deb
110
109
path : |
111
110
${{ github.workspace }}/build/falco-*.deb
112
111
113
112
- name : Upload Falco rpm package
114
113
uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
115
114
with :
116
- name : falco-${{ inputs.version }}-${{ inputs.arch }}${{ inputs.sanitizers == true && '-sanitizers' || '' }}.rpm
115
+ name : falco-${{ inputs.version }}-${{ inputs.arch }}.rpm
116
+ path : |
117
+ ${{ github.workspace }}/build/falco-*.rpm
118
+
119
+ build-packages-debug :
120
+ # See https://github.com/actions/runner/issues/409#issuecomment-1158849936
121
+ runs-on : ${{ (inputs.arch == 'aarch64' && 'oracle-aarch64-4cpu-16gb') || 'ubuntu-22.04' }}
122
+ if : ${{ inputs.enable_debug == true }}
123
+ needs : [build-modern-bpf-skeleton]
124
+ steps :
125
+ # Always install deps before invoking checkout action, to properly perform a full clone.
126
+ - name : Install build deps
127
+ run : |
128
+ sudo apt update && sudo apt install -y --no-install-recommends ca-certificates cmake curl wget build-essential git pkg-config autoconf automake libtool libelf-dev m4 rpm
129
+
130
+ - name : Checkout
131
+ uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
132
+
133
+ - name : Download skeleton
134
+ uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
135
+ with :
136
+ name : bpf_probe_${{ inputs.arch }}.skel.h
137
+ path : /tmp
138
+
139
+ - name : Install zig
140
+ if : inputs.sanitizers == false
141
+ uses : falcosecurity/libs/.github/actions/install-zig@master
142
+
143
+ - name : Prepare project
144
+ run : |
145
+ cmake -B build -S . \
146
+ -DCMAKE_BUILD_TYPE=Debug \
147
+ -DUSE_BUNDLED_DEPS=On \
148
+ -DFALCO_ETC_DIR=/etc/falco \
149
+ -DMODERN_BPF_SKEL_DIR=/tmp \
150
+ -DBUILD_DRIVER=Off \
151
+ -DBUILD_BPF=Off \
152
+ -DUSE_JEMALLOC=On \
153
+ -DFALCO_VERSION=${{ inputs.version }}
154
+
155
+ - name : Build project
156
+ run : |
157
+ cmake --build build --target falco -j6
158
+
159
+ - name : Build packages
160
+ run : |
161
+ cmake --build build --target package
162
+
163
+ - name : Upload Falco tar.gz package
164
+ uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
165
+ with :
166
+ name : falco-${{ inputs.version }}-${{ inputs.arch }}-debug.tar.gz
117
167
path : |
118
- ${{ github.workspace }}/build/falco-*.rpm
168
+ ${{ github.workspace }}/build/falco-*.tar.gz
169
+
170
+ build-packages-sanitizers :
171
+ # See https://github.com/actions/runner/issues/409#issuecomment-1158849936
172
+ runs-on : ${{ (inputs.arch == 'aarch64' && 'oracle-aarch64-4cpu-16gb') || 'ubuntu-latest' }}
173
+ if : ${{ inputs.enable_sanitizers == true }}
174
+ needs : [build-modern-bpf-skeleton]
175
+ steps :
176
+ # Always install deps before invoking checkout action, to properly perform a full clone.
177
+ - name : Install build deps
178
+ run : |
179
+ sudo apt update && sudo apt install -y --no-install-recommends ca-certificates cmake curl wget build-essential git pkg-config autoconf automake libtool libelf-dev m4 rpm
180
+
181
+ - name : Checkout
182
+ uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
183
+
184
+ - name : Download skeleton
185
+ uses : actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
186
+ with :
187
+ name : bpf_probe_${{ inputs.arch }}.skel.h
188
+ path : /tmp
189
+
190
+ - name : Prepare project
191
+ run : |
192
+ cmake -B build -S . \
193
+ -DCMAKE_BUILD_TYPE=Debug \
194
+ -DUSE_BUNDLED_DEPS=On \
195
+ -DFALCO_ETC_DIR=/etc/falco \
196
+ -DMODERN_BPF_SKEL_DIR=/tmp \
197
+ -DBUILD_DRIVER=Off \
198
+ -DBUILD_BPF=Off \
199
+ -DUSE_JEMALLOC=Off \
200
+ -DUSE_ASAN=On \
201
+ -DFALCO_VERSION=${{ inputs.version }}
202
+
203
+ - name : Build project
204
+ run : |
205
+ cmake --build build --target falco -j6
206
+
207
+ - name : Build packages
208
+ run : |
209
+ cmake --build build --target package
210
+
211
+ - name : Upload Falco tar.gz package
212
+ uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
213
+ with :
214
+ name : falco-${{ inputs.version }}-${{ inputs.arch }}-sanitizers.tar.gz
215
+ path : |
216
+ ${{ github.workspace }}/build/falco-*.tar.gz
119
217
120
-
121
218
build-musl-package :
122
219
# x86_64 only for now
123
220
if : ${{ inputs.arch == 'x86_64' }}
@@ -141,7 +238,7 @@ jobs:
141
238
- name : Prepare project
142
239
run : |
143
240
cmake -B build -S . \
144
- -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
241
+ -DCMAKE_BUILD_TYPE=Release \
145
242
-DCPACK_GENERATOR=TGZ \
146
243
-DBUILD_BPF=Off -DBUILD_DRIVER=Off \
147
244
-DUSE_BUNDLED_DEPS=On -DBUILD_LIBSCAP_MODERN_BPF=ON -DMUSL_OPTIMIZED_BUILD=On -DFALCO_ETC_DIR=/etc/falco -DFALCO_VERSION=${{ inputs.version }}
@@ -192,7 +289,7 @@ jobs:
192
289
-DBUILD_BPF=Off \
193
290
-DBUILD_DRIVER=Off \
194
291
-DBUILD_FALCO_MODERN_BPF=Off \
195
- -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
292
+ -DCMAKE_BUILD_TYPE=Release \
196
293
-DUSE_BUNDLED_DEPS=On \
197
294
-DFALCO_ETC_DIR=/etc/falco \
198
295
-DBUILD_FALCO_UNIT_TESTS=On \
@@ -232,28 +329,28 @@ jobs:
232
329
# NOTE: Backslash doesn't work as line continuation on Windows.
233
330
- name : Prepare project
234
331
run : |
235
- cmake -B build -S . -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DMINIMAL_BUILD=On -DUSE_BUNDLED_DEPS=On -DBUILD_FALCO_UNIT_TESTS=On -DFALCO_VERSION=${{ inputs.version }}
332
+ cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DMINIMAL_BUILD=On -DUSE_BUNDLED_DEPS=On -DBUILD_FALCO_UNIT_TESTS=On -DFALCO_VERSION=${{ inputs.version }}
236
333
237
334
- name : Build project
238
335
run : |
239
- cmake --build build --target package --config ${{ inputs.build_type }}
336
+ cmake --build build --target package --config Release
240
337
241
338
- name : Run unit Tests
242
339
run : |
243
- build/unit_tests/${{ inputs.build_type }} /falco_unit_tests.exe
340
+ build/unit_tests/Release /falco_unit_tests.exe
244
341
245
342
- name : Upload Falco win32 installer
246
343
uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
247
344
with :
248
- name : falco-installer-${{ inputs.version }} -win32.exe
345
+ name : falco-installer-Release -win32.exe
249
346
path : build/falco-*.exe
250
347
251
348
- name : Upload Falco win32 package
252
349
uses : actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
253
350
with :
254
- name : falco-${{ inputs.version }} -win32.exe
351
+ name : falco-Release -win32.exe
255
352
path : |
256
- ${{ github.workspace }}/build/userspace/falco/${{ inputs.build_type }} /falco.exe
353
+ ${{ github.workspace }}/build/userspace/falco/Release /falco.exe
257
354
258
355
build-macos-package :
259
356
if : ${{ inputs.arch == 'x86_64' }}
0 commit comments