-
Notifications
You must be signed in to change notification settings - Fork 59
239 lines (211 loc) · 6.8 KB
/
Copy pathnative.yaml
File metadata and controls
239 lines (211 loc) · 6.8 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
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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
name: compile and unit test on native arch
on:
push:
branches:
- master
- queue
- tip
- 'stable-*'
paths:
- '.github/workflows/native.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
- '**.mk'
pull_request:
branches:
- master
- queue
- 'stable-*'
paths:
- '.github/workflows/native.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
- '**.mk'
jobs:
stable:
strategy:
fail-fast: false
matrix:
os:
- debian-jessie
- debian-buster
- debian-bullseye
- debian-bookworm
- debian-trixie
- fedora-43
- opensuse-leap-15.6
- opensuse-leap-16.0
variant:
- arch: x86_64
runner: ubuntu-24.04
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.variant.runner }}
steps:
- name: checkout
uses: actions/checkout@v7
# On jessie, we use libreadline 5 (no licensing issue)
- name: set readline make option (Jessie)
run: echo READLINE=libreadline >> $GITHUB_ENV
if: matrix.os == 'debian-jessie'
- name: Set coredump pattern
run: |
echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
- name: build and test
id: test
run: |
docker run -w ${{ github.workspace }} -v${{ github.workspace }}:${{ github.workspace }} \
ghcr.io/mwilck/multipath-build-${{ matrix.os }} \
-j$(nproc) -Orecurse V=1 READLINE=$READLINE test
continue-on-error: true
- name: create test-progs.tar
run: |
docker run -w ${{ github.workspace }} -v${{ github.workspace }}:${{ github.workspace }} \
ghcr.io/mwilck/multipath-build-${{ matrix.os }} test-progs.tar
- name: upload test-progs.tar
uses: actions/upload-artifact@v7
with:
name: native-${{ matrix.os }}-${{ matrix.variant.arch }}
path: test-progs.tar
overwrite: true
- name: Make core dumps accessible
run: |
find . \( -name 'core*' \) -print0 | xargs -0 -r sudo chmod a+r
if: steps.test.outcome != 'success'
- name: create test-outputs.tar
run: make test-outputs.tar
if: steps.test.outcome != 'success'
- name: upload test-outputs.tar
uses: actions/upload-artifact@v7
with:
name: gcc-outputs-${{ matrix.os }}-${{ matrix.variant.arch }}
path: test-outputs.tar
overwrite: true
if: steps.test.outcome != 'success'
- name: fail if test failed
run: /bin/false
if: steps.test.outcome != 'success'
clang:
strategy:
fail-fast: false
matrix:
os:
- debian-buster
- debian-bullseye
- debian-bookworm
- debian-trixie
- fedora-43
- opensuse-leap-15.6
- opensuse-leap-16.0
variant:
- arch: x86_64
runner: ubuntu-24.04
- arch: aarch64
runner: ubuntu-24.04-arm
include:
- os: debian-jessie
variant:
arch: x86_64
runner: ubuntu-24.04
runs-on: ${{ matrix.variant.runner }}
steps:
- name: checkout
uses: actions/checkout@v7
# On jessie, we use libreadline 5 (no licensing issue)
- name: set readline make option (Jessie)
run: echo READLINE=libreadline >> $GITHUB_ENV
if: matrix.os == 'debian-jessie'
- name: Set coredump pattern
run: |
echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
- name: build and test with clang
id: test
run: |
docker run --pids-limit 4096 -e CC=clang \
-w ${{ github.workspace }} -v${{ github.workspace }}:${{ github.workspace }} \
ghcr.io/mwilck/multipath-build-${{ matrix.os }} \
-j$(nproc) -Orecurse V=1 READLINE=$READLINE test
continue-on-error: true
- name: Make core dumps accessible
run: |
find . \( -name 'core*' \) -print0 | xargs -0 -r sudo chmod a+r
if: steps.test.outcome != 'success'
- name: create test-outputs.tar
run: make test-outputs.tar
if: steps.test.outcome != 'success'
- name: upload test-outputs.tar
uses: actions/upload-artifact@v7
with:
name: clang-outputs-${{ matrix.os }}-${{ matrix.variant.arch }}
path: test-outputs.tar
overwrite: true
if: steps.test.outcome != 'success'
- name: fail if test failed
run: /bin/false
if: steps.test.outcome != 'success'
root-test:
needs: stable
strategy:
fail-fast: false
matrix:
os:
- debian-jessie
- debian-buster
- debian-bullseye
- debian-bookworm
- debian-trixie
- fedora-43
- opensuse-leap-15.6
- opensuse-leap-16.0
variant:
- arch: x86_64
runner: ubuntu-24.04
- arch: aarch64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.variant.runner }}
steps:
- name: mpath
run: sudo modprobe dm_multipath
- name: brd
run: sudo modprobe brd rd_nr=1 rd_size=65536
- name: checkout
uses: actions/checkout@v7
- name: download binary archive
uses: actions/download-artifact@v8
with:
name: native-${{ matrix.os }}-${{ matrix.variant.arch }}
- name: unpack binary archive
run: tar xfmv test-progs.tar
- name: Set coredump pattern
run: |
echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
- name: run root tests
id: test
run: |
docker run \
--workdir /__w/multipath-tools/multipath-tools --privileged \
-v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0 \
-w /__w/multipath-tools/multipath-tools \
-v${{ github.workspace }}:/__w/multipath-tools/multipath-tools \
ghcr.io/mwilck/multipath-build-${{ matrix.os }} \
-C tests V=1 directio.out dmevents.out
continue-on-error: true
- name: Make core dumps accessible
run: |
find . \( -name 'core*' \) -print0 | xargs -0 -r sudo chmod a+r
if: steps.test.outcome != 'success'
- name: create test-outputs.tar
run: make test-outputs.tar
if: steps.test.outcome != 'success'
- name: upload test-outputs.tar
uses: actions/upload-artifact@v7
with:
name: clang-outputs-${{ matrix.os }}-${{ matrix.variant.arch }}
path: test-outputs.tar
overwrite: true
if: steps.test.outcome != 'success'
- name: fail if test failed
run: /bin/false
if: steps.test.outcome != 'success'