Skip to content

Commit ce5566f

Browse files
committed
Update GitHub ci configuration
Copied from pvData.
1 parent 60ccbad commit ce5566f

1 file changed

Lines changed: 197 additions & 68 deletions

File tree

.github/workflows/ci-scripts-build.yml

Lines changed: 197 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,29 @@
33

44
# This is YAML - indentation levels are crucial
55

6-
# Workflow name
6+
# Workflow name, shared by all branches
77

8-
name: Base
8+
name: pvDatabase
99

1010
# Trigger on pushes and PRs to any branch
1111
on:
1212
push:
1313
paths-ignore:
14-
- 'documentation/*'
15-
- '.appveyor.yml'
16-
- '.readthedocs.yml'
14+
- .appveyor.yml
1715
pull_request:
18-
paths-ignore:
19-
- 'documentation/*'
20-
- '.appveyor.yml'
21-
- '.readthedocs.yml'
2216

2317
env:
2418
SETUP_PATH: .ci-local:.ci
2519
EPICS_TEST_IMPRECISE_TIMING: YES
20+
EPICS_TEST_TIMEOUT: 300 # 5 min
2621

2722
jobs:
28-
build-base:
23+
native:
2924
name: ${{ matrix.name }}
3025
runs-on: ${{ matrix.os }}
3126
# Set environment variables from matrix parameters
3227
env:
28+
# NB: PVA modules build against both BASE 7.0 and 3.15
3329
BASE: ${{ matrix.base }}
3430
CMP: ${{ matrix.cmp }}
3531
BCFG: ${{ matrix.configuration }}
@@ -41,113 +37,170 @@ jobs:
4137
matrix:
4238
# Job names also name artifacts, character limitations apply
4339
include:
44-
- os: ubuntu-22.04
40+
- name: "7.0 Ub gcc c++20 Werror"
41+
base: "7.0"
42+
os: ubuntu-latest
4543
cmp: gcc
4644
configuration: default
47-
base: "7.0"
48-
cross: "windows-x64-mingw"
49-
name: "7.0 Ub-22 gcc + MinGW"
45+
# Turn all warnings into errors,
46+
# except for those we could not fix (yet).
47+
# Remove respective -Wno-error=... flag once it is fixed.
48+
extra: "CMD_CXXFLAGS=-std=c++20
49+
CMD_CPPFLAGS='-fdiagnostics-color
50+
-fstack-protector-strong
51+
-Wformat
52+
-Werror
53+
-Werror=format-security
54+
-Wno-error=deprecated-declarations
55+
-Wno-error=stringop-truncation
56+
-Wno-error=restrict
57+
-Wno-error=sizeof-pointer-memaccess
58+
-Wno-error=nonnull
59+
-Wno-error=dangling-pointer
60+
-Wno-error=format-overflow
61+
-Wno-error=stringop-overread
62+
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
63+
CMD_LDFLAGS=-Wl,-z,relro"
5064

51-
- os: ubuntu-22.04
52-
cmp: gcc
53-
configuration: static
65+
- name: "7.0 Ub gcc C++11, static"
5466
base: "7.0"
55-
cross: "windows-x64-mingw"
56-
name: "7.0 Ub-22 gcc + MinGW, static"
57-
58-
- os: ubuntu-22.04
67+
os: ubuntu-latest
5968
cmp: gcc
6069
configuration: static
61-
base: "7.0"
6270
extra: "CMD_CXXFLAGS=-std=c++11"
63-
name: "7.0 Ub-22 gcc C++11, static"
6471

65-
- os: ubuntu-22.04
72+
- name: "7.0 Ub gcc u-char"
73+
base: "7.0"
74+
os: ubuntu-latest
6675
cmp: gcc
6776
configuration: static
68-
base: "7.0"
6977
extra: "CMD_CFLAGS=-funsigned-char CMD_CXXFLAGS=-funsigned-char"
70-
name: "7.0 Ub-22 gcc uchar"
7178

72-
- os: ubuntu-22.04
79+
- name: "7.0 Ub clang"
80+
base: "7.0"
81+
os: ubuntu-latest
7382
cmp: clang
7483
configuration: default
75-
base: "7.0"
76-
name: "7.0 Ub-22 clang"
7784

78-
- os: ubuntu-22.04
85+
- name: "7.0 Ub clang C++11"
86+
base: "7.0"
87+
os: ubuntu-latest
7988
cmp: clang
8089
configuration: default
81-
base: "7.0"
8290
extra: "CMD_CXXFLAGS=-std=c++11"
83-
name: "7.0 Ub-22 clang C++11"
8491

85-
- os: ubuntu-22.04
92+
- name: "7.0 MacOS clang"
93+
base: "7.0"
94+
os: macos-latest
95+
cmp: clang
96+
configuration: default
97+
98+
# Cross builds
99+
100+
- name: "3.15 Ub-22 gcc + MinGW"
101+
base: "3.15"
102+
os: ubuntu-22.04
86103
cmp: gcc
87104
configuration: default
105+
cross: "windows-x64-mingw"
106+
107+
- name: "7.0 Ub gcc + linux-aarch64"
88108
base: "7.0"
89-
cross: "RTEMS-pc686-qemu@5"
90-
name: "7.0 Ub-22 gcc + RT-5.1 pc686"
109+
os: ubuntu-latest
110+
cmp: gcc
111+
configuration: default
112+
cross: "linux-aarch64"
91113

92-
- os: ubuntu-22.04
114+
- name: "7.0 Ub gcc + linux-arm gnueabi"
115+
base: "7.0"
116+
os: ubuntu-latest
93117
cmp: gcc
94118
configuration: default
119+
cross: "linux-arm@arm-linux-gnueabi"
120+
121+
- name: "7.0 Ub gcc + linux-arm gnueabihf"
95122
base: "7.0"
96-
cross: "RTEMS-pc386-qemu@4.10"
97-
test: NO
98-
name: "7.0 Ub-22 gcc + RT-4.10"
123+
os: ubuntu-latest
124+
cmp: gcc
125+
configuration: default
126+
cross: "linux-arm@arm-linux-gnueabihf"
99127

100-
- os: ubuntu-22.04
128+
- name: "7.0 Ub gcc + MinGW"
129+
base: "7.0"
130+
os: ubuntu-latest
101131
cmp: gcc
102132
configuration: default
133+
cross: "windows-x64-mingw"
134+
135+
- name: "7.0 Ub gcc + MinGW, static"
103136
base: "7.0"
104-
cross: "RTEMS-pc386-qemu@4.9"
105-
name: "7.0 Ub-22 gcc + RT-4.9"
137+
os: ubuntu-latest
138+
cmp: gcc
139+
configuration: static
140+
cross: "windows-x64-mingw"
106141

107-
- os: macos-latest
108-
cmp: clang
142+
- name: "7.0 Ub-22 gcc + RT-4.9 pc386"
143+
base: "7.0"
144+
os: ubuntu-22.04
145+
cmp: gcc
109146
configuration: default
147+
cross: "RTEMS-pc386-qemu@4.9"
148+
149+
- name: "7.0 Ub-22 gcc + RT-4.10 pc386"
110150
base: "7.0"
111-
name: "7.0 MacOS clang"
151+
os: ubuntu-22.04
152+
cmp: gcc
153+
configuration: default
154+
cross: "RTEMS-pc386-qemu@4.10"
155+
test: NO
112156

113-
- os: windows-2019
114-
cmp: vs2019
157+
- name: "7.0 Ub-22 gcc + RT-5.1 pc686"
158+
base: "7.0"
159+
os: ubuntu-22.04
160+
cmp: gcc
115161
configuration: default
162+
cross: "RTEMS-pc686-qemu@5"
163+
164+
- name: "7.0 Ub-22 gcc + RT-5.1 beatnik,zynq_a9,uC5282"
116165
base: "7.0"
117-
name: "7.0 Win2019 MSC-19"
118-
extra: "CMD_CXXFLAGS=-analysis"
166+
os: ubuntu-22.04
167+
cmp: gcc
168+
configuration: default
169+
cross: "RTEMS-beatnik@5:RTEMS-xilinx_zynq_a9_qemu@5:RTEMS-uC5282@5"
170+
test: NO
119171

120-
- os: windows-2019
121-
cmp: vs2019
122-
configuration: static
172+
# Windows builds
173+
174+
- name: "7.0 Win-22 MSC-22"
123175
base: "7.0"
124-
name: "7.0 Win2019 MSC-19, static"
125-
extra: "CMD_CXXFLAGS=-analysis"
176+
os: windows-2022
177+
cmp: vs2022
178+
configuration: default
126179

127-
- os: windows-2019
128-
cmp: vs2019
129-
configuration: debug
180+
- name: "7.0 Win-22 MSC-22 static"
130181
base: "7.0"
131-
name: "7.0 Win2019 MSC-19, debug"
182+
os: windows-2022
183+
cmp: vs2022
184+
configuration: static
132185

133-
- os: windows-2019
134-
cmp: gcc
135-
configuration: default
186+
- name: "7.0 Win-22 MSC-22 debug"
136187
base: "7.0"
137-
name: "7.0 Win2019 mingw"
188+
os: windows-2022
189+
cmp: vs2022
190+
configuration: debug
191+
extra: "CMD_CXXFLAGS=-analyze"
138192

139-
- os: ubuntu-22.04
193+
- name: "7.0 Win-22 MinGW"
194+
base: "7.0"
195+
os: windows-2022
140196
cmp: gcc
141197
configuration: default
142-
base: "3.15"
143-
wine: "64"
144-
name: "3.15 Ub-22 gcc + MinGW"
145198

146199
steps:
147200
- uses: actions/checkout@v4
148201
with:
149202
submodules: true
150-
- name: Automatic core dump analysis
203+
- name: Automatic core dumper analysis
151204
uses: mdavidsaver/ci-core-dumper@master
152205
- name: "apt-get install"
153206
run: |
@@ -159,7 +212,7 @@ jobs:
159212
- name: Build main module
160213
run: python .ci/cue.py build
161214
- name: Run main module tests
162-
run: python .ci/cue.py -T 20M test
215+
run: python .ci/cue.py -T 60M test
163216
- name: Upload tapfiles Artifact
164217
if: ${{ always() }}
165218
uses: actions/upload-artifact@v4
@@ -170,3 +223,79 @@ jobs:
170223
- name: Collect and show test results
171224
if: ${{ always() }}
172225
run: python .ci/cue.py -T 5M test-results
226+
227+
docker:
228+
name: ${{ matrix.name }}
229+
runs-on: ubuntu-latest
230+
container:
231+
image: ${{ matrix.image }}
232+
# Set environment variables from matrix parameters
233+
env:
234+
BASE: ${{ matrix.base }}
235+
CMP: ${{ matrix.cmp }}
236+
BCFG: ${{ matrix.configuration }}
237+
EXTRA: ${{ matrix.extra }}
238+
TEST: ${{ matrix.test }}
239+
strategy:
240+
fail-fast: false
241+
matrix:
242+
# Job names also name artifacts, character limitations apply
243+
include:
244+
- name: "7.0 CentOS-8 gcc"
245+
base: "7.0"
246+
image: centos:8
247+
cmp: gcc
248+
configuration: default
249+
250+
- name: "7.0 Rocky-9 gcc"
251+
base: "7.0"
252+
image: rockylinux:9
253+
cmp: gcc
254+
configuration: default
255+
256+
- name: "7.0 Fedora-33 gcc"
257+
base: "7.0"
258+
image: fedora:33
259+
cmp: gcc
260+
configuration: default
261+
262+
- name: "7.0 Fedora gcc"
263+
base: "7.0"
264+
image: fedora:latest
265+
cmp: gcc
266+
configuration: default
267+
268+
steps:
269+
- name: "Fix repo URLs on CentOS-8"
270+
# centos:8 is frozen, repos are in the vault
271+
if: matrix.image=='centos:8'
272+
run: |
273+
sed -i -e "s|mirrorlist=|#mirrorlist=|" \
274+
-e "s|#baseurl=http://mirror|baseurl=http://vault|" \
275+
/etc/yum.repos.d/CentOS-Linux-{BaseOS,AppStream,Extras,Plus}.repo
276+
- name: "Redhat setup"
277+
run: |
278+
dnf -y install python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel perl-Test-Simple
279+
git --version || dnf -y install git
280+
python3 --version
281+
- uses: actions/checkout@v4
282+
with:
283+
submodules: true
284+
- name: Automatic core dumper analysis
285+
uses: mdavidsaver/ci-core-dumper@master
286+
- name: Prepare and compile dependencies
287+
run: python3 .ci/cue.py prepare
288+
- name: Build main module
289+
run: python3 .ci/cue.py build
290+
- name: Run main module tests
291+
run: python3 .ci/cue.py -T 20M test
292+
- name: Upload tapfiles Artifact
293+
if: ${{ always() }}
294+
uses: actions/upload-artifact@v4
295+
with:
296+
name: tapfiles ${{ matrix.name }}
297+
path: '**/O.*/*.tap'
298+
if-no-files-found: ignore
299+
- name: Collect and show test results
300+
if: ${{ always() }}
301+
run: python3 .ci/cue.py -T 5M test-results

0 commit comments

Comments
 (0)