Skip to content

Commit 1d0265f

Browse files
committed
test
Signed-off-by: Roberto Scolaro <[email protected]>
1 parent ab6bfa9 commit 1d0265f

File tree

1 file changed

+53
-61
lines changed

1 file changed

+53
-61
lines changed

Diff for: .github/workflows/ci.yaml

+53-61
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,10 @@ on:
88

99

1010
jobs:
11-
builder:
12-
env:
13-
REGISTRY: ghcr.io
14-
BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-builder-pr
15-
SKEL_BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-skel-builder-pr
16-
BUILDER_DEV: ghcr.io/draios/sysdig-builder:dev
17-
SKEL_BUILDER_DEV: ghcr.io/draios/sysdig-skel-builder:dev
18-
runs-on: ubuntu-24.04${{ matrix.platform == 'arm64' && '-arm64' || '' }}
19-
strategy:
20-
matrix:
21-
platform:
22-
- amd64
23-
- arm64
24-
steps:
25-
- name: Checkout Sysdig
26-
uses: actions/checkout@v4
27-
with:
28-
fetch-depth: 0
29-
30-
- name: Check if builder is modified
31-
id: builder-files
32-
uses: tj-actions/changed-files@v34
33-
with:
34-
files: |
35-
docker/builder/**
36-
37-
- name: Set up Docker Buildx
38-
if: steps.builder-files.outputs.any_changed == 'true'
39-
uses: docker/setup-buildx-action@v3
40-
41-
- name: Login to Github Packages
42-
if: steps.builder-files.outputs.any_changed == 'true'
43-
uses: docker/login-action@v3
44-
with:
45-
registry: ${{ env.REGISTRY }}
46-
username: ${{ github.actor }}
47-
password: ${{ secrets.GITHUB_TOKEN }}
48-
49-
- name: Get new builder image tag
50-
id: get-new-builder
51-
if: steps.builder-files.outputs.any_changed == 'true'
52-
run: |
53-
echo "builder_image=${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.BUILDER_DEV }}" >> $GITHUB_OUTPUT
54-
55-
- name: Build new builder
56-
id: build-builder
57-
if: steps.builder-files.outputs.any_changed == 'true'
58-
uses: docker/build-push-action@v6
59-
with:
60-
context: docker/builder
61-
platforms: linux/${{ matrix.platform }}
62-
tags: ${{ steps.get-new-builder.outputs.builder_image }}
63-
push: true
64-
outputs:
65-
builder_image: ${{ (steps.builder-files.outputs.any_changed == 'true') && steps.get-new-builder.outputs.builder_image || env.BUILDER_DEV }}
66-
6711
build-sysdig-linux:
68-
needs: [builder]
6912
runs-on: ubuntu-24.04${{ matrix.platform == 'arm64' && '-arm64' || '' }}
7013
container:
71-
image: ${{ needs.builder.outputs.builder_image }}
14+
image: ubuntu:22.04
7215
strategy:
7316
matrix:
7417
platform:
@@ -81,9 +24,60 @@ jobs:
8124
with:
8225
fetch-depth: 0
8326

27+
- name: Install deps
28+
run: |
29+
cp -v docker/builder/zig-cc /usr/bin/
30+
cp -v docker/builder/zig-c++ /usr/bin/
31+
apt update && \
32+
apt install -y --no-install-recommends \
33+
autoconf \
34+
automake \
35+
build-essential \
36+
ca-certificates \
37+
clang \
38+
cmake \
39+
curl \
40+
git \
41+
libelf-dev \
42+
libtool \
43+
llvm \
44+
ninja-build \
45+
pkg-config \
46+
wget \
47+
xz-utils && \
48+
git clone https://github.com/libbpf/bpftool.git --branch v7.3.0 --single-branch && \
49+
cd bpftool && \
50+
git submodule update --init && \
51+
cd src && \
52+
make install && \
53+
cd ../.. && \
54+
rm -fr bpftool && \
55+
echo curl -LO https://ziglang.org/builds/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz && \
56+
curl -LO https://ziglang.org/builds/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz && \
57+
tar -xaf zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz && \
58+
rm -v zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz && \
59+
cd zig-linux-$(uname -m)-${ZIG_VERSION} && \
60+
cp -v zig /usr/bin && \
61+
find lib -exec cp --parents {} /usr/ \; && \
62+
cd .. && \
63+
rm -fr zig*
64+
8465
- name: Build Sysdig
66+
env:
67+
CC: zig-cc
68+
CXX: zig-c++
69+
AR: zig ar
70+
RANLIB: zig ranlib
71+
ZIG_VERSION: 0.14.0-dev.2851+b074fb7dd
8572
run: |
86-
cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_BPF=OFF -DBUILD_DRIVER=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build -G Ninja
73+
cmake \
74+
-DUSE_BUNDLED_DEPS=ON \
75+
-DBUILD_BPF=OFF \
76+
-DBUILD_DRIVER=OFF \
77+
-DCMAKE_BUILD_TYPE=Release \
78+
-S . \
79+
-B build \
80+
-G Ninja
8781
cmake --build build --target package --config Release
8882
8983
- name: Set artifact name
@@ -119,8 +113,6 @@ jobs:
119113
os: [windows-latest, macos-13]
120114
include:
121115
- os: windows-latest
122-
artifact_name: win
123-
artifact_ext: exe
124116
- os: macos-13
125117
artifact_name: osx
126118
artifact_ext: dmg

0 commit comments

Comments
 (0)