Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
  • Loading branch information
therealbobo committed Dec 10, 2024
1 parent 52fb073 commit 0ed5a43
Showing 1 changed file with 17 additions and 79 deletions.
96 changes: 17 additions & 79 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,25 @@ on:


jobs:
build-sysdig-linux-amd64:
build-sysdig-linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- amd64
- arm64
container:
image: debian:buster

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.arch }}

- name: Install deps ⛓️
run: |

Check failure on line 28 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:9:4: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/ci.yaml:28:9: shellcheck reported issue in this script: SC2086:info:9:4: Double quote to prevent globbing and word splitting [shellcheck]
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 linux-headers-amd64
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 linux-headers-${{ matrix.arch }}
DIR=$(pwd)
cd /tmp
git clone https://github.com/libbpf/bpftool.git --branch v7.3.0 --single-branch
Expand Down Expand Up @@ -43,104 +54,31 @@ jobs:

- name: Build Sysdig
run: |

Check failure on line 56 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2046:warning:3:9: Quote this to prevent word splitting [shellcheck] Raw Output: .github/workflows/ci.yaml:56:9: shellcheck reported issue in this script: SC2046:warning:3:9: Quote this to prevent word splitting [shellcheck]
cmake -DUSE_BUNDLED_DEPS=ON -DBUILD_BPF=OFF -DBUILD_SYSDIG_MODERN_BPF=ON -DBUILD_DRIVER=OFF -DCMAKE_BUILD_TYPE=Release -S . -B build
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
- name: Upload rpm package
uses: actions/upload-artifact@v3

Check failure on line 62 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/ci.yaml:62:15: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
name: sysdig-dev-linux-x86_64.rpm
name: sysdig-dev-linux-${{ matrix.arch }}.rpm
path: |
build/release/sysdig-*.rpm
- name: Upload deb package
uses: actions/upload-artifact@v3

Check failure on line 69 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/ci.yaml:69:15: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
name: sysdig-dev-linux-x86_64.deb
name: sysdig-dev-linux-${{ matrix.arch }}.deb
path: |
build/release/sysdig-*.deb
- name: Upload tar.gz package
uses: actions/upload-artifact@v3

Check failure on line 76 in .github/workflows/ci.yaml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action] Raw Output: .github/workflows/ci.yaml:76:15: the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
with:
name: sysdig-dev-linux-x86_64.tar.gz
name: sysdig-dev-linux-${{ matrix.arch }}.tar.gz
path: |
build/release/sysdig-*.tar.gz
build-sysdig-linux-arm64:
env:
REGISTRY: ghcr.io
BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-builder-pr
SKEL_BUILDER_IMAGE_BASE: ghcr.io/draios/sysdig-skel-builder-pr
BUILDER_DEV: ghcr.io/draios/sysdig-builder:dev
SKEL_BUILDER_DEV: ghcr.io/draios/sysdig-skel-builder:dev
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
runs-on: ubuntu-latest
steps:
- name: Checkout Sysdig
uses: actions/checkout@v4
with:
path: sysdig
- name: Create build dir
run: |
mkdir -p ${{ github.workspace }}/sysdig-build-aarch64
- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: 'amd64,arm64'
- name: Run the build skeleton process with Docker
uses: addnab/docker-run-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
image: ${{ needs.builder.outputs.skeleton_builder_image }}
options: --platform=linux/arm64 -v ${{ github.workspace }}/sysdig:/source/sysdig -v ${{ github.workspace }}/sysdig-build-aarch64:/build/dev-packages -v ${{ github.workspace }}/skeleton-build:/build-skeleton
run: |
mkdir -p /build/dev-packages && \
build cmake-skeleton && \
build make-skeleton
- name: Run the build process with Docker
uses: addnab/docker-run-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
image: ${{ needs.builder.outputs.builder_image }}
options: --platform=linux/arm64 -v ${{ github.workspace }}/sysdig:/source/sysdig -v ${{ github.workspace }}/sysdig-build-aarch64:/build/dev-packages -v ${{ github.workspace }}/skeleton-build:/build-skeleton
run: |
mkdir -p /build/dev-packages && \
build cmake && \
build package && \
cp /build/release/sysdig-* /build/dev-packages
- name: Upload deb package
uses: actions/upload-artifact@v3
with:
name: sysdig-dev-linux-aarch64.deb
path: |
${{ github.workspace }}/sysdig-build-aarch64/sysdig-*.deb
- name: Upload rpm package
uses: actions/upload-artifact@v3
with:
name: sysdig-dev-linux-aarch64.rpm
path: |
${{ github.workspace }}/sysdig-build-aarch64/sysdig-*.rpm
- name: Upload tar.gz package
uses: actions/upload-artifact@v3
with:
name: sysdig-dev-linux-aarch64.tar.gz
path: |
${{ github.workspace }}/sysdig-build-aarch64/sysdig-*.tar.gz
build-sysdig-others-amd64:
name: build-sysdig-other-amd64
strategy:
Expand Down

0 comments on commit 0ed5a43

Please sign in to comment.