split_rh: Add more binaries to simplify netdata installation (#383) #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Builds and Releases packages for eBPF to be consumed by Netdata Agent | |
name: CD | |
on: | |
push: | |
tags: | |
- 'v*' | |
concurrency: | |
group: cd-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-artifacts: | |
name: Build Artifacts | |
strategy: | |
matrix: | |
kernel_version: | |
- '6.8.2' | |
- '5.16.18' | |
- '5.15.63' | |
- '5.14.0' | |
- '5.11.19' | |
- '5.10.139' | |
- '5.4.210' | |
- '5.4.17' | |
- '4.16.18' | |
- '4.18.0' | |
- '4.14.291' | |
- '3.10.0' | |
libc: | |
- static | |
- glibc | |
- musl | |
exclude: | |
# excludes static on 3.10.0 (https://github.com/netdata/kernel-collector/issues/153) | |
- kernel_version: 3.10.0 | |
libc: static | |
- kernel_version: 5.4.17 | |
libc: static | |
# excludes musl on 3.10.0 | |
- kernel_version: 3.10.0 | |
libc: musl | |
- kernel_version: 5.4.17 | |
libc: musl | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Run build.sh | |
run: | | |
if [ ${{ matrix.kernel_version }} = "5.14.0" ]; then | |
os=centos9 | |
elif [ ${{ matrix.kernel_version }} = "5.4.17" ]; then | |
os=oracle8 | |
elif [ ${{ matrix.kernel_version }} = "4.18.0" ]; then | |
os=centos8 | |
elif [ ${{ matrix.kernel_version }} = "3.10.0" ]; then | |
os=centos7 | |
else | |
os=generic | |
fi | |
./build.sh ${{ matrix.kernel_version }} ${{ matrix.libc }} "${os}" | |
- name: List Artifacts | |
run: | | |
ls -lah artifacts | |
test -f artifacts/netdata_ebpf-*.tar.xz | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
if: success() | |
with: | |
name: artifacts-${{ matrix.kernel_version }}-${{ matrix.libc }} | |
path: artifacts | |
create-release: | |
name: Create Release | |
needs: build-artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: artifacts-* | |
path: artifacts | |
merge-multiple: true | |
- name: Set release_tag | |
run: | | |
echo "RELEASE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Consolidate Artifacts | |
run: | | |
mkdir -p final-artifacts | |
for libc in static glibc musl; do | |
for pkg in artifacts/netdata_ebpf-*_*-${libc}.tar.xz; do | |
mkdir -p "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}" | |
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}" -xvf "${pkg}" | |
done | |
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}" -Jcvf "final-artifacts/netdata-kernel-collector-${libc}-${RELEASE_TAG}-all.tar.xz" ./ | |
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}/*rhf.*" -Jcvf "final-artifacts/netdata-kernel-collector-${libc}-${RELEASE_TAG}-rhf.tar.xz" ./ | |
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}/*.*[0-9].*[0-9].o" -Jcvf "final-artifacts/netdata-kernel-collector-${libc}-${RELEASE_TAG}.tar.xz" ./ | |
done | |
cd final-artifacts && sha256sum ./*.tar.xz > sha256sums.txt | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: false | |
artifactErrorsFailBuild: true | |
artifacts: 'final-artifacts/*' | |
draft: true | |
token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }} |