-
Notifications
You must be signed in to change notification settings - Fork 24
189 lines (171 loc) · 5.54 KB
/
main.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Main collector CI
on:
push:
branches:
- master
- release-*
tags:
- 3.*.*
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- reopened
permissions:
pull-requests: write
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
init:
uses: ./.github/workflows/init.yml
secrets: inherit
with:
cpaas-workflow: false
build-drivers:
uses: ./.github/workflows/drivers.yml
with:
drivers-bucket: ${{ needs.init.outputs.drivers-bucket }}
bundles-bucket: ${{ needs.init.outputs.bundles-bucket }}
branch-name: ${{ needs.init.outputs.branch-name }}
needs: init
secrets: inherit
upload-drivers:
uses: ./.github/workflows/upload-drivers.yml
with:
gcp-bucket: ${{ needs.init.outputs.push-drivers-bucket }}
merged-drivers-bucket: ${{ needs.init.outputs.merged-drivers-bucket }}
if: ${{ needs.build-drivers.outputs.parallel-jobs > 0 }}
needs:
- init
- build-drivers
secrets: inherit
check-drivers-build:
uses: ./.github/workflows/check-drivers-failures.yml
needs: build-drivers
if: ${{ needs.build-drivers.outputs.parallel-jobs > 0 }}
secrets: inherit
with:
logs-artifact: driver-build-failures-*
build-builder-image:
uses: ./.github/workflows/collector-builder.yml
needs: init
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
secrets: inherit
build-collector-slim:
uses: ./.github/workflows/collector-slim.yml
needs:
- init
- build-builder-image
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-image: ${{ needs.init.outputs.collector-image }}
collector-builder-tag: ${{ needs.build-builder-image.outputs.collector-builder-tag }}
secrets: inherit
build-collector-full:
uses: ./.github/workflows/collector-full.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
drivers-bucket: ${{ needs.init.outputs.drivers-bucket }}
arch-drivers-bucket: ${{ needs.init.outputs.cpaas-drivers-bucket }}
skip-built-drivers: ${{ needs.build-drivers.outputs.parallel-jobs == 0 }}
archs: amd64 ppc64le s390x arm64
secrets: inherit
needs:
- init
- build-collector-slim
- build-drivers
build-test-containers:
uses: ./.github/workflows/integration-test-containers.yml
needs:
- init
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
rebuild-qa-containers: ${{ needs.init.outputs.rebuild-qa-containers == 'true' }}
secrets: inherit
memory-checked-unit-tests:
runs-on: ubuntu-latest
container:
image: quay.io/stackrox-io/collector-builder:${{ needs.build-builder-image.outputs.collector-builder-tag }}
needs:
- build-builder-image
strategy:
fail-fast: false
matrix:
config-args:
- -DADDRESS_SANITIZER=ON
- -DUSE_VALGRIND=ON
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build collector
run: |
cmake -S . -B cmake-build \
${{ matrix.config-args }} \
-DCMAKE_BUILD_TYPE=Debug
make -C cmake-build "-j$(nproc)"
- name: Run unit tests
run: |
ctest -V --test-dir cmake-build
integration-tests:
uses: ./.github/workflows/integration-tests.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
needs:
- init
- build-collector-slim
- build-collector-full
- build-test-containers
secrets: inherit
k8s-integration-tests:
uses: ./.github/workflows/k8s-integration-tests.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-integration-tests') }}
needs:
- init
- build-collector-slim
- build-collector-full
- build-test-containers
secrets: inherit
benchmarks:
uses: ./.github/workflows/benchmarks.yml
with:
collector-tag: ${{ needs.init.outputs.collector-tag }}
collector-qa-tag: ${{ needs.init.outputs.collector-qa-tag }}
if: |
always() &&
((github.event_name == 'push' && github.ref_name == 'master') ||
contains(github.event.pull_request.labels.*.name, 'run-benchmark'))
needs:
- init
- build-collector-slim
- build-collector-full
- build-test-containers
secrets: inherit
build-support-packages:
uses: ./.github/workflows/support-packages.yml
with:
branch-name: ${{ needs.init.outputs.branch-name }}
upstream-drivers-bucket: ${{ needs.init.outputs.drivers-bucket }}
downstream-drivers-bucket: ${{ needs.init.outputs.cpaas-drivers-bucket }}/x86_64
support-packages-bucket: ${{ needs.init.outputs.support-packages-bucket }}
support-packages-index-bucket: ${{ needs.init.outputs.support-packages-index-bucket }}
public-support-packages-bucket: ${{ needs.init.outputs.public-support-packages-bucket }}
if: |
always() &&
((github.event_name == 'push' && github.ref_name == 'master') ||
contains(github.event.pull_request.labels.*.name, 'test-support-packages'))
needs:
- init
- build-drivers
- upload-drivers
secrets: inherit