@@ -54,35 +54,23 @@ jobs:
54
54
# See https://github.com/actions/runner/issues/409#issuecomment-1158849936
55
55
runs-on : ${{ (inputs.arch == 'aarch64' && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }}
56
56
needs : [build-modern-bpf-skeleton]
57
- container : centos:7
58
57
steps :
59
58
# Always install deps before invoking checkout action, to properly perform a full clone.
60
- - name : Fix mirrors to use vault.centos.org
61
- run : |
62
- sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
63
- sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
64
- sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo
65
-
66
- - name : Install scl repos
67
- run : |
68
- yum -y install centos-release-scl
69
-
70
- - name : Fix new mirrors to use vault.centos.org
71
- run : |
72
- sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
73
- sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
74
- sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo
75
-
76
- - name : Fix arm64 scl repos to use correct mirror
77
- if : inputs.arch == 'aarch64'
59
+ - name : Install build deps
78
60
run : |
79
- sed -i 's/vault.centos.org\/centos/vault.centos.org\/altarch/g' /etc/yum.repos.d/CentOS-SCLo-scl*.repo
61
+ 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
80
62
81
- - name : Install build deps
63
+ - name : Install zig
82
64
run : |
83
- yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++
84
- source /opt/rh/devtoolset-9/enable
85
- yum install -y wget git make m4 rpm-build elfutils-libelf-devel perl-IPC-Cmd devtoolset-9-libasan-devel devtoolset-9-libubsan-devel
65
+ curl -L -o zig.tar.gz https://ziglang.org/download/0.13.0/zig-linux-$(uname -m)-0.13.0.tar.xz
66
+ tar -xvf zig.tar.gz
67
+ sudo mkdir -p /usr/local/zig/
68
+ sudo cp -R zig-linux-$(uname -m)-0.13.0/* /usr/local/zig/
69
+ 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
72
+ echo "AR=zig ar" >> $GITHUB_ENV
73
+ echo "RANLIB=zig ranlib" >> $GITHUB_ENV
86
74
87
75
- name : Checkout
88
76
# It is not possible to upgrade the checkout action to versions >= v4.0.0 because of incompatibilities with centos 7's libc.
@@ -94,17 +82,12 @@ jobs:
94
82
name : bpf_probe_${{ inputs.arch }}.skel.h
95
83
path : /tmp
96
84
97
- - name : Install updated cmake
98
- run : |
99
- curl -L https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-$(uname -m).tar.gz \
100
- | tar --directory=/usr --strip-components=1 -xzp
101
-
102
85
- name : Prepare project
103
86
run : |
104
- source /opt/rh/devtoolset-9/enable
105
87
cmake -B build -S . \
106
88
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
107
89
-DUSE_BUNDLED_DEPS=On \
90
+ -DUSE_BUNDLED_LIBELF=On \
108
91
-DFALCO_ETC_DIR=/etc/falco \
109
92
-DMODERN_BPF_SKEL_DIR=/tmp \
110
93
-DBUILD_DRIVER=Off \
@@ -114,12 +97,10 @@ jobs:
114
97
115
98
- name : Build project
116
99
run : |
117
- source /opt/rh/devtoolset-9/enable
118
100
cmake --build build --target falco -j6
119
101
120
102
- name : Build packages
121
103
run : |
122
- source /opt/rh/devtoolset-9/enable
123
104
cmake --build build --target package
124
105
125
106
- name : Upload Falco tar.gz package
0 commit comments