-
Notifications
You must be signed in to change notification settings - Fork 189
281 lines (266 loc) · 8.09 KB
/
validate.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
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
name: Validate
on:
push:
branches:
- 3.x
pull_request:
branches:
- 3.x
env:
SKIP_CI_SPECS: |
components/fs/lustre-client/SPECS/lustre.spec
components/parallel-libs/trilinos/SPECS/trilinos.spec
components/admin/docs/SPECS/docs.spec
jobs:
check_spec:
env:
JOB_SKIP_CI_SPECS: |
components/admin/ohpc-filesystem/SPECS/ohpc-filesystem.spec
runs-on: ubuntu-latest
container:
image: docker.io/library/rockylinux:9
steps:
- name: Setup
run: |
dnf install -y epel-release git python3
- uses: actions/checkout@v3
- id: files
uses: Ana06/[email protected]
- name: Validate Changes
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
tests/ci/check_spec.py ${{ steps.files.outputs.added_modified }}
lint_markdown:
name: Run markdown linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint markdown
uses: DavidAnson/markdownlint-cli2-action@v9
with:
globs: |
README.md
CONTRIBUTING.md
lint:
strategy:
matrix:
step: [codespell, flake8, shellcheck, whitespace]
name: Run ${{ matrix.step }} linter
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:latest
steps:
- name: Setup
run: dnf -y install codespell make python3-flake8 ShellCheck
- uses: actions/checkout@v3
- name: Run ${{ matrix.step }}
run: make -C tests/ci/ ${{ matrix.step }}-lint
build_on_rhel:
strategy:
matrix:
compiler: [gnu12]
runs-on: ubuntu-latest
name: Build on RHEL (${{ matrix.compiler}})
container:
image: docker.io/library/rockylinux:9
steps:
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }} --compiler-family ${{ matrix.compiler}}
touch /tmp/empty
- uses: actions/upload-artifact@v3
if: matrix.compiler == 'gnu12'
with:
name: rhel-rpms
retention-days: 1
path: |
/home/ohpc/rpmbuild/RPMS/noarch/*rpm
/home/ohpc/rpmbuild/RPMS/x86_64/*rpm
/tmp/empty
test_on_rhel:
runs-on: ubuntu-latest
name: Test on RHEL
env:
JOB_SKIP_CI_SPECS: |
components/perf-tools/likwid/SPECS/likwid.spec
container:
image: docker.io/library/rockylinux:9
options: --privileged --cap-add SYS_ADMIN
needs: build_on_rhel
steps:
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- uses: actions/download-artifact@v3
with:
name: rhel-rpms
path: /home/ohpc/rpmbuild/RPMS
- name: Run CI Tests
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
. /etc/profile.d/lmod.sh
chown ohpc -R tests
tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }}
- name: Upload Test Results
# To display test results from forked repositories they need to
# be uploaded and then analyzed.
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
retention-days: 1
path: tests/**/*.log.xml
build_on_openEuler:
runs-on: ubuntu-latest
name: Build on openEuler
container:
image: docker.io/openeuler/openeuler:22.03-lts
steps:
- name: Switch repo
run: sed -i "[email protected]@repo.huaweicloud.com/openeuler@g" /etc/yum.repos.d/openEuler.repo
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }}
touch /tmp/empty
- uses: actions/upload-artifact@v3
with:
name: openEuler-rpms
retention-days: 1
path: |
/home/ohpc/rpmbuild/RPMS/noarch/*rpm
/home/ohpc/rpmbuild/RPMS/x86_64/*rpm
/tmp/empty
test_on_openEuler:
env:
JOB_SKIP_CI_SPECS: |
components/runtimes/charliecloud/SPECS/charliecloud.spec
components/perf-tools/likwid/SPECS/likwid.spec
runs-on: ubuntu-latest
name: Test on openEuler
container:
image: docker.io/openeuler/openeuler:22.03-lts
options: --privileged --cap-add SYS_ADMIN
needs: build_on_openEuler
steps:
- name: Switch repo
run: sed -i "[email protected]@repo.huaweicloud.com/openeuler@g" /etc/yum.repos.d/openEuler.repo
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- uses: actions/download-artifact@v3
with:
name: openEuler-rpms
path: /home/ohpc/rpmbuild/RPMS
- name: Run CI Tests
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
. /etc/profile.d/lmod.sh
chown ohpc -R tests
tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }}
build_on_leap:
runs-on: ubuntu-latest
name: Build on LEAP
container:
image: registry.opensuse.org/opensuse/leap:15.4
steps:
- name: Install git
run: zypper -n update; zypper -n install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }}
touch /tmp/empty
- uses: actions/upload-artifact@v3
with:
name: leap-rpms
retention-days: 1
path: |
/home/ohpc/rpmbuild/RPMS/noarch/*rpm
/home/ohpc/rpmbuild/RPMS/x86_64/*rpm
/tmp/empty
test_on_leap:
env:
JOB_SKIP_CI_SPECS: |
components/runtimes/charliecloud/SPECS/charliecloud.spec
components/perf-tools/likwid/SPECS/likwid.spec
runs-on: ubuntu-latest
name: Test on LEAP
container:
image: registry.opensuse.org/opensuse/leap:15.4
options: --privileged --cap-add SYS_ADMIN
needs: build_on_leap
steps:
- name: Install git
run: zypper -n update; zypper -n install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- uses: actions/download-artifact@v3
with:
name: leap-rpms
path: /home/ohpc/rpmbuild/RPMS
- name: Run CI Tests
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
. /etc/profile.d/lmod.sh
chown ohpc -R tests
tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }}
build_on_centos_stream_9:
runs-on: ubuntu-latest
name: Build on CentOS Stream 9
container:
image: quay.io/centos/centos:stream9
steps:
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v3
- name: Setup
run: tests/ci/prepare-ci-environment.sh
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }}
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
if: always()
uses: actions/upload-artifact@v3
with:
name: event-file
retention-days: 1
path: ${{ github.event_path }}