forked from bpftrace/bpftrace
-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (166 loc) · 8.13 KB
/
embedded.yml
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Embedded Builds
on: [push, pull_request]
# Cancel previous run if a new one is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
llvm_clang:
runs-on: ubuntu-latest
strategy:
matrix:
env:
- TYPE: Release
NAME: vanilla_llvm12+clang+glibc2.27
LLVM_VERSION: 12
STATIC_LINKING: ON
STATIC_LIBC: OFF
EMBED_BUILD_LLVM: OFF
EMBED_USE_LLVM: ON
RUN_ALL_TESTS: 1
RUNTIME_TEST_DISABLE: builtin.cgroup,probe.kprobe_offset_fail_size,usdt.usdt probes - file based semaphore activation multi process,usdt.usdt probes - attach to fully specified probe all pids
TOOLS_TEST_OLDVERSION: tcpdrop.bt
TOOLS_TEST_DISABLE: biosnoop.bt
BASE: bionic
DISTRO: ubuntu-glibc
VENDOR_GTEST: ON
ENABLE_SKB_OUTPUT: ON
- TYPE: Release
NAME: vanilla_llvm12+clang+glibc2.31
LLVM_VERSION: 12
STATIC_LINKING: ON
STATIC_LIBC: OFF
EMBED_BUILD_LLVM: OFF
EMBED_USE_LLVM: ON
RUN_ALL_TESTS: 1
RUNTIME_TEST_DISABLE: builtin.cgroup,probe.kprobe_offset_fail_size,other.string compare map lookup,call.skboutput,usdt.usdt probes - file based semaphore activation multi process,usdt.usdt probes - attach to fully specified probe all pids
TOOLS_TEST_OLDVERSION: tcpdrop.bt
TOOLS_TEST_DISABLE: biosnoop.bt
BASE: focal
DISTRO: ubuntu-glibc
VENDOR_GTEST: ON
ENABLE_SKB_OUTPUT: OFF
- TYPE: Debug
NAME: alpine
LLVM_VERSION: 10
STATIC_LINKING: ON
STATIC_LIBC: ON
EMBED_BUILD_LLVM: OFF
RUN_ALL_TESTS: 1
RUNTIME_TEST_DISABLE: json-output.join_delim,other.string compare map lookup,probe.kprobe_offset_fail_size,probe.uprobe_library,usdt.usdt probes - attach to fully specified probe of child,usdt.usdt probes - all probes by wildcard and file with child,usdt.usdt probes - attach to probe by wildcard and file with child,usdt.usdt probes - attach to probes by wildcard file with child,usdt.usdt probes - attach to probe on multiple files by wildcard,usdt.usdt probes - attach to probe with probe builtin and args by file with child,usdt.usdt probes - list probes by pid in separate mountns,usdt.usdt sized arguments,usdt.usdt - list probes by file with wildcarded probe type,usdt.usdt probes - attach to fully specified probe all pids,uprobe.uprobes - list probes by pid; uprobes only,uprobe.uprobes - list probes by pid in separate mount namespace,other.positional pointer arithmetics,call.skboutput,usdt.usdt probes - file based semaphore activation multi process,probe.uprobe_zero_size,probe.uprobe_zero_size_unsafe
TOOLS_TEST_DISABLE: biosnoop.bt,gethostlatency.bt,threadsnoop.bt,ssllatency.bt,sslsnoop.bt
TOOLS_TEST_OLDVERSION: tcpdrop.bt
BASE: alpine
DISTRO: alpine
ALPINE_VERSION: 3.12
VENDOR_GTEST: ON
ENABLE_SKB_OUTPUT: OFF
- TYPE: Release
NAME: alpine
LLVM_VERSION: 10
STATIC_LINKING: ON
STATIC_LIBC: ON
EMBED_BUILD_LLVM: OFF
RUN_ALL_TESTS: 1
RUNTIME_TEST_DISABLE: other.string compare map lookup,probe.kprobe_offset_fail_size,probe.uprobe_library,usdt.usdt probes - attach to fully specified probe of child,usdt.usdt probes - all probes by wildcard and file with child,usdt.usdt probes - attach to probe by wildcard and file with child,usdt.usdt probes - attach to probes by wildcard file with child,usdt.usdt probes - attach to probe on multiple files by wildcard,usdt.usdt probes - attach to probe with probe builtin and args by file with child,usdt.usdt probes - list probes by pid in separate mountns,usdt.usdt sized arguments,usdt.usdt - list probes by file with wildcarded probe type,usdt.usdt probes - attach to fully specified probe all pids,uprobe.uprobes - list probes by pid; uprobes only,uprobe.uprobes - list probes by pid in separate mount namespace,other.positional pointer arithmetics,call.skboutput,usdt.usdt probes - file based semaphore activation multi process,probe.uprobe_zero_size,probe.uprobe_zero_size_unsafe
TOOLS_TEST_DISABLE: biosnoop.bt,gethostlatency.bt,threadsnoop.bt,ssllatency.bt,sslsnoop.bt
TOOLS_TEST_OLDVERSION: tcpdrop.bt
BASE: alpine
DISTRO: alpine
ALPINE_VERSION: 3.12
VENDOR_GTEST: ON
ENABLE_SKB_OUTPUT: OFF
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build docker container
run: >
docker build
-t bpftrace-embedded-${{ matrix.env['BASE'] }}
-f docker/Dockerfile.${{ matrix.env['DISTRO'] }}
--build-arg BASE=${{ matrix.env['BASE'] }}
--build-arg LLVM_VERSION=${{ matrix.env['LLVM_VERSION'] }}
--build-arg ALPINE_VERSION=${{ matrix.env['ALPINE_VERSION'] }}
docker/
- name: bpftrace embedded build
env: ${{ matrix.env }}
run: >
docker run --privileged
-v $(pwd):$(pwd)
-w $(pwd)
-v /sys/kernel/debug:/sys/kernel/debug:rw
-v /lib/modules:/lib/modules:ro
-v /usr/src:/usr/src:ro
-e LLVM_VERSION=${LLVM_VERSION}
-e STATIC_LINKING=${STATIC_LINKING}
-e STATIC_LIBC=${STATIC_LIBC}
-e EMBED_USE_LLVM=${EMBED_USE_LLVM}
-e EMBED_BUILD_LLVM=${EMBED_BUILD_LLVM}
-e RUN_ALL_TESTS=${RUN_ALL_TESTS}
-e CMAKE_EXTRA_FLAGS="${CMAKE_EXTRA_FLAGS}"
-e TEST_GROUPS_DISABLE="${TEST_GROUPS_DISABLE}"
-e RUNTIME_TEST_DISABLE="${RUNTIME_TEST_DISABLE}"
-e VENDOR_GTEST="${VENDOR_GTEST}"
-e TOOLS_TEST_OLDVERSION="$TOOLS_TEST_OLDVERSION"
-e TOOLS_TEST_DISABLE="$TOOLS_TEST_DISABLE"
-e ENABLE_SKB_OUTPUT="$ENABLE_SKB_OUTPUT"
bpftrace-embedded-${{ matrix.env['BASE'] }}
$(pwd)/build-embedded ${TYPE}
-j`nproc`
- name: Check linked libs
env: ${{ matrix.env }}
run: >
docker run --privileged
-v $(pwd):$(pwd)
-w $(pwd)
--entrypoint /bin/bash
bpftrace-embedded-${{ matrix.env['BASE'] }}
-c "[[ -f $(pwd)/build-embedded/src/bpftrace ]] && ! readelf --dynamic $(pwd)/build-embedded/src/bpftrace | grep NEEDED | grep -v 'libm\|libc\|ld-linux\|libpthread\|libdl\|librt\.so'"
- name: Strip artifacts
env: ${{ matrix.env }}
if: matrix.env['TYPE'] == 'Release'
run: >
docker run --privileged
-v $(pwd):$(pwd)
-w $(pwd)
--entrypoint /bin/bash
bpftrace-embedded-${{ matrix.env['BASE'] }}
-c "strip --keep-symbol BEGIN_trigger --keep-symbol END_trigger $(pwd)/build-embedded/src/bpftrace"
- name: Report size
env: ${{ matrix.env }}
run: >
docker run --privileged
-v $(pwd):$(pwd)
-w $(pwd)
--entrypoint /bin/bash
bpftrace-embedded-${{ matrix.env['BASE'] }}
-c "echo SIZE: ; du -sh $(pwd)/build-embedded/src/bpftrace"
- uses: actions/upload-artifact@v1
with:
name: bpftrace-${{ matrix.env['TYPE'] }}-${{ matrix.env['NAME'] }}
path: build-embedded/src/bpftrace
- uses: actions/upload-artifact@v1
with:
name: bpftrace_test-${{ matrix.env['TYPE'] }}-${{ matrix.env['NAME'] }}
path: build-embedded/tests/bpftrace_test
- name: Authenticate with docker registry
if: >
matrix.env['TYPE'] == 'Release' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) &&
github.repository == 'iovisor/bpftrace'
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: ./docker/scripts/auth.sh ${{ github.repository }}
- name: Package docker image and push to quay.io
if: >
matrix.env['TYPE'] == 'Release' &&
(github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) &&
github.repository == 'iovisor/bpftrace'
run: >
./docker/scripts/push.sh
${{ github.repository }}
${{ github.ref }}
${{ github.sha }}
${{ matrix.env['NAME'] }}
${{ matrix.env['EDGE'] }}