Skip to content

Commit 4efe8a1

Browse files
committed
fix(ci): don't use builder image
Signed-off-by: Roberto Scolaro <[email protected]>
1 parent ab6bfa9 commit 4efe8a1

File tree

1 file changed

+55
-62
lines changed

1 file changed

+55
-62
lines changed

.github/workflows/ci.yaml

+55-62
Original file line numberDiff line numberDiff line change
@@ -8,82 +8,77 @@ 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]
69-
runs-on: ubuntu-24.04${{ matrix.platform == 'arm64' && '-arm64' || '' }}
12+
runs-on: ubuntu-24.04${{ matrix.platform == 'arm64' && '-arm' || '' }}
7013
container:
71-
image: ${{ needs.builder.outputs.builder_image }}
14+
image: ubuntu:22.04
7215
strategy:
7316
matrix:
7417
platform:
7518
- amd64
7619
- arm64
20+
env:
21+
ZIG_VERSION: 0.14.0-dev.2851+b074fb7dd
7722

7823
steps:
7924
- name: Checkout Sysdig
8025
uses: actions/checkout@v4
8126
with:
8227
fetch-depth: 0
8328

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

0 commit comments

Comments
 (0)