Repository navigation
114 lines (113 loc) · 3.36 KB
/
Copy pathrelease.yml
File metadata and controls
114 lines (113 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
# 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:
- '7.2.8'
- '6.16.2'
- '6.8.2'
- '5.16.18'
- '5.17.15'
- '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'
libc:
- static
- glibc
- musl
exclude:
- kernel_version: 5.4.17
libc: static
- kernel_version: 5.4.17
libc: musl
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
submodules: true
fetch-depth: 0
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- 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
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
- name: Upload Artifacts
uses: actions/upload-artifact@v6
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: Checkout
uses: actions/checkout@v7
with:
submodules: true
fetch-depth: 0
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Download all Artifacts
uses: actions/download-artifact@v7
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; do
mkdir -p "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}"
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}" -xvf "${pkg}"
done
if [ "${libc}" == "glibc" ]; then cp -R CentOS7/* "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}"; fi
tar -C "packages/netdata-kernel-collector-${libc}-${RELEASE_TAG}" -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 }}