From b59bcb1c9ec39eeb1998b7ac537c77a9989b3912 Mon Sep 17 00:00:00 2001 From: Roberto Scolaro Date: Tue, 10 Dec 2024 22:50:16 +0000 Subject: [PATCH] wip Signed-off-by: Roberto Scolaro --- .github/workflows/ci.yaml | 54 +++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c16699371..d25069fc74 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,33 +15,23 @@ jobs: platform: - linux/amd64 - linux/arm64 - container: - image: debian:buster steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - name: Install deps ⛓️ + - name: Install deps run: | - apt update && apt install -y --no-install-recommends ninja-build curl ca-certificates build-essential git clang llvm pkg-config autoconf automake libtool libelf-dev wget libc-ares-dev libcurl4-openssl-dev libssl-dev libtbb-dev libjq-dev libjsoncpp-dev libgrpc++-dev protobuf-compiler-grpc libgtest-dev libprotobuf-dev + sudo apt update && sudo apt install -y --no-install-recommends ninja-build curl ca-certificates build-essential git clang llvm pkg-config autoconf automake libtool libelf-dev wget libc-ares-dev libcurl4-openssl-dev libssl-dev libtbb-dev libjq-dev libjsoncpp-dev libgrpc++-dev protobuf-compiler-grpc libgtest-dev libprotobuf-dev cmake ninja-build DIR=$(pwd) cd /tmp git clone https://github.com/libbpf/bpftool.git --branch v7.3.0 --single-branch cd bpftool git submodule update --init cd src - make install + sudo make install cd ${DIR} - - name: Install a recent version of CMake ⛓️ - run: | - curl -L -o /tmp/cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.22.5/cmake-3.22.5-linux-$(uname -m).tar.gz - gzip -d /tmp/cmake.tar.gz - tar -xpf /tmp/cmake.tar --directory=/tmp - cp -R /tmp/cmake-3.22.5-linux-$(uname -m)/* /usr - rm -rf /tmp/cmake-3.22.5-linux-$(uname -m)/ - - name: Checkout Sysdig uses: actions/checkout@v4 with: @@ -52,30 +42,34 @@ jobs: - name: Build Sysdig run: | - cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_BPF=OFF -DBUILD_SYSDIG_MODERN_BPF=OFF -DBUILD_DRIVER=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build - cd build - make -j $(nproc) package + cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_BPF=OFF -DBUILD_SYSDIG_MODERN_BPF=OFF -DBUILD_DRIVER=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build -G Ninja + cmake --build build --target package --config Release + + - name: Set artifact name + id: artifact_name + run: | + echo "name=sysdig-dev-$(echo ${{ matrix.platform }} | sed -e 's|/|-|g')" >> $GITHUB_OUTPUT - name: Upload rpm package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: sysdig-dev-$(${{ matrix.arch }} | sed -e 's|/||g').rpm + name: ${{ steps.artifact_name.outputs.name }}.rpm path: | - build/release/sysdig-*.rpm + build/sysdig-*.rpm - name: Upload deb package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: sysdig-dev-linux-$(${{ matrix.arch }} | sed -e 's|/||g').deb + name: ${{ steps.artifact_name.outputs.name }}.deb path: | - build/release/sysdig-*.deb + build/sysdig-*.deb - name: Upload tar.gz package - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: sysdig-dev-linux-$(${{ matrix.arch }} | sed -e 's|/||g').tar.gz + name: ${{ steps.artifact_name.outputs.name }}.tar.gz path: | - build/release/sysdig-*.tar.gz + build/sysdig-*.tar.gz build-sysdig-others-amd64: name: build-sysdig-other-amd64 @@ -95,9 +89,8 @@ jobs: uses: actions/checkout@v4 - name: Build run: | - mkdir -p build - cd build && cmake -Wno-dev .. - cmake --build . --target package --config Release + cmake -Wno-dev -S . -B build + cmake --build build --target package --config Release - name: Upload artifacts uses: actions/upload-artifact@v3 with: @@ -120,9 +113,8 @@ jobs: uses: actions/checkout@v4 - name: Build run: | - mkdir -p build - cd build && cmake -Wno-dev .. - cmake --build . --target package --config Release + cmake -Wno-dev -S . -B build + cmake --build build --target package --config Release - name: Upload artifacts uses: actions/upload-artifact@v3 with: