Skip to content

Commit 70e175a

Browse files
committed
chore(ci,cmake): bump libs to HEAD of chore/zig_build branch.
Improve CI workflow by adding wrapper scripts zig-cc and zig-c++ to be used as environment vars `CC` and `CXX`, since cmake var `CMAKE_{C,CXX}_COMPILER` does truncate those variables to their first part (ie: before the first whitespace), otherwise leading to issues, since only `zig` would be used as compiler by cmake. Signed-off-by: Federico Di Pierro <[email protected]>
1 parent c410963 commit 70e175a

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/reusable_build_packages.yaml

+18-4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
build-packages:
5252
env:
5353
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
54+
ZIG_VERSION: '0.13.0'
5455
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
5556
runs-on: ${{ (inputs.arch == 'aarch64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }}
5657
needs: [build-modern-bpf-skeleton]
@@ -62,13 +63,26 @@ jobs:
6263
6364
- name: Install zig
6465
run: |
65-
curl -L -o zig.tar.gz https://ziglang.org/download/0.13.0/zig-linux-$(uname -m)-0.13.0.tar.xz
66+
curl -L -o zig.tar.gz https://ziglang.org/download/0.13.0/zig-linux-${{ inputs.arch }}-${ZIG_VERSION}.tar.xz
6667
tar -xvf zig.tar.gz
68+
69+
cat > zig-linux-${{ inputs.arch }}-${ZIG_VERSION}/zig-cc << EOF
70+
#!/bin/bash
71+
zig cc -target ${{ inputs.arch }}-linux-gnu.2.17 "$@"
72+
EOF
73+
chmod +x zig-linux-${{ inputs.arch }}-${ZIG_VERSION}/zig-cc
74+
75+
cat > zig-linux-${{ inputs.arch }}-${ZIG_VERSION}/zig-c++ << EOF
76+
#!/bin/bash
77+
zig c++ -target ${{ inputs.arch }}-linux-gnu.2.17 "$@"
78+
EOF
79+
chmod +x zig-linux-${{ inputs.arch }}-${ZIG_VERSION}/zig-c++
80+
6781
sudo mkdir -p /usr/local/zig/
68-
sudo cp -R zig-linux-$(uname -m)-0.13.0/* /usr/local/zig/
82+
sudo cp -R zig-linux-${{ inputs.arch }}-${ZIG_VERSION}/* /usr/local/zig/
6983
echo "/usr/local/zig" >> $GITHUB_PATH
70-
echo "CC=zig cc -target $(uname -m)-linux-gnu.2.17" >> $GITHUB_ENV
71-
echo "CXX=zig c++ -target $(uname -m)-linux-gnu.2.17" >> $GITHUB_ENV
84+
echo "CC=zig-cc" >> $GITHUB_ENV
85+
echo "CXX=zig-c++" >> $GITHUB_ENV
7286
echo "AR=zig ar" >> $GITHUB_ENV
7387
echo "RANLIB=zig ranlib" >> $GITHUB_ENV
7488

cmake/modules/falcosecurity-libs.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ else()
3535
# In case you want to test against another falcosecurity/libs version (or branch, or commit) just pass the variable -
3636
# ie., `cmake -DFALCOSECURITY_LIBS_VERSION=dev ..`
3737
if(NOT FALCOSECURITY_LIBS_VERSION)
38-
set(FALCOSECURITY_LIBS_VERSION "d8865276b5cac665f318d1a52be945f556d87a41")
38+
set(FALCOSECURITY_LIBS_VERSION "eacdaa9915aa5451ce157247b8cb49f706296d49")
3939
#set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=aedc4120d335ee2ebf7f3c2e6346fc985ca09a49d14ff7c6249a033e47d160bf")
4040
endif()
4141

0 commit comments

Comments
 (0)