Skip to content

Commit 8eddb86

Browse files
committed
GHA: inherit GHA jobs from pvData
1 parent c2a6fe8 commit 8eddb86

File tree

1 file changed

+192
-57
lines changed

1 file changed

+192
-57
lines changed

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

Lines changed: 192 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,153 +3,203 @@
33

44
# This is YAML - indentation levels are crucial
55

6-
# Set the 'name:' properties to values that work for you (pvxs)
6+
# Set the 'name:' properties to values that work for you
77

8-
name: Base
8+
name: pvAccess
99

1010
# Trigger on pushes and PRs to any branch
1111
on:
1212
push:
1313
paths-ignore:
14-
- '.*.yml'
1514
- 'documentation/*'
15+
- 'startup/*'
16+
- '.appveyor/*'
17+
- '.tools/*'
18+
- '.gitattributes'
19+
- '**/*.html'
1620
- '**/*.md'
1721
pull_request:
1822
paths-ignore:
19-
- '.*.yml'
2023
- 'documentation/*'
24+
- 'startup/*'
25+
- '.appveyor/*'
26+
- '.tools/*'
27+
- '.gitattributes'
28+
- '**/*.html'
2129
- '**/*.md'
2230

2331
env:
2432
SETUP_PATH: .ci-local:.ci
2533
EPICS_TEST_IMPRECISE_TIMING: YES
34+
EPICS_TEST_TIMEOUT: 300 # 5 min (RTEMS epicsMessageQueue is slowest)
2635

2736
jobs:
28-
build-base:
37+
native:
2938
name: ${{ matrix.name }}
3039
runs-on: ${{ matrix.os }}
3140
# Set environment variables from matrix parameters
3241
env:
33-
BASE: ${{ matrix.base }}
42+
BASE: "7.0"
3443
CMP: ${{ matrix.cmp }}
3544
BCFG: ${{ matrix.configuration }}
36-
WINE: ${{ matrix.wine }}
37-
RTEMS: ${{ matrix.rtems }}
38-
RTEMS_TARGET: ${{ matrix.rtems_target }}
45+
CI_CROSS_TARGETS: ${{ matrix.cross }}
3946
EXTRA: ${{ matrix.extra }}
4047
TEST: ${{ matrix.test }}
4148
strategy:
4249
fail-fast: false
4350
matrix:
4451
# Job names also name artifacts, character limitations apply
4552
include:
53+
- os: ubuntu-22.04
54+
cmp: gcc-12
55+
name: "Ub-22 gcc-12 c++20 Werror"
56+
# Turn all warnings into errors,
57+
# except for those we could not fix (yet).
58+
# Remove respective -Wno-error=... flag once it is fixed.
59+
extra: "CMD_CXXFLAGS=-std=c++20
60+
CMD_CPPFLAGS='-fdiagnostics-color
61+
-fstack-protector-strong
62+
-Wformat
63+
-Werror
64+
-Werror=format-security
65+
-Wno-error=deprecated-declarations
66+
-Wno-error=stringop-truncation
67+
-Wno-error=restrict
68+
-Wno-error=sizeof-pointer-memaccess
69+
-Wno-error=nonnull
70+
-Wno-error=dangling-pointer
71+
-Wno-error=format-overflow
72+
-Wno-error=stringop-overread
73+
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
74+
CMD_LDFLAGS=-Wl,-z,relro"
75+
4676
- os: ubuntu-20.04
4777
cmp: gcc
4878
configuration: default
49-
base: "3.15"
50-
wine: "64"
51-
name: "3.15 Ub-20 gcc-9 + MinGW"
79+
cross: "windows-x64-mingw"
80+
name: "Ub-20 gcc + MinGW"
5281

5382
- os: ubuntu-20.04
5483
cmp: gcc
55-
configuration: default
56-
base: "7.0"
57-
wine: "64"
58-
name: "7.0 Ub-20 gcc-9 + MinGW"
84+
configuration: static
85+
cross: "windows-x64-mingw"
86+
name: "Ub-20 gcc + MinGW, static"
5987

6088
- os: ubuntu-20.04
6189
cmp: gcc
6290
configuration: static
63-
base: "7.0"
64-
wine: "64"
65-
name: "7.0 Ub-20 gcc-9 + MinGW, static"
91+
extra: "CMD_CXXFLAGS=-std=c++11"
92+
name: "Ub-20 gcc C++11, static"
6693

6794
- os: ubuntu-20.04
6895
cmp: gcc
6996
configuration: static
70-
base: "7.0"
71-
extra: "CMD_CXXFLAGS=-std=c++11"
72-
name: "7.0 Ub-20 gcc-9 C++11, static"
97+
extra: "CMD_CFLAGS=-funsigned-char CMD_CXXFLAGS=-funsigned-char"
98+
name: "Ub-20 gcc unsigned char"
7399

74100
- os: ubuntu-20.04
75101
cmp: clang
76102
configuration: default
77-
base: "7.0"
78-
name: "7.0 Ub-20 clang-10"
103+
name: "Ub-20 clang"
79104

80105
- os: ubuntu-20.04
81106
cmp: clang
82107
configuration: default
83-
base: "7.0"
84108
extra: "CMD_CXXFLAGS=-std=c++11"
85-
name: "7.0 Ub-20 clang-10 C++11"
109+
name: "Ub-20 clang C++11"
110+
111+
- os: ubuntu-20.04
112+
cmp: gcc
113+
configuration: default
114+
cross: "RTEMS-pc686-qemu@5"
115+
name: "Ub-20 gcc + RT-5.1 pc686"
116+
117+
- os: ubuntu-20.04
118+
cmp: gcc
119+
configuration: default
120+
cross: "RTEMS-beatnik@5"
121+
test: NO
122+
name: "Ub-20 gcc + RT-5.1 beatnik"
123+
124+
- os: ubuntu-20.04
125+
cmp: gcc
126+
configuration: default
127+
cross: "RTEMS-xilinx_zynq_a9_qemu@5"
128+
test: NO
129+
name: "Ub-20 gcc + RT-5.1 xilinx_zynq_a9_qemu"
86130

87131
- os: ubuntu-20.04
88132
cmp: gcc
89133
configuration: default
90-
base: "7.0"
91-
rtems: "5"
92-
rtems_target: RTEMS-pc686-qemu
134+
cross: "RTEMS-uC5282@5"
93135
test: NO
94-
name: "7.0 Ub-20 gcc-9 + RT-5.1 pc686"
136+
name: "Ub-20 gcc + RT-5.1 uC5282"
95137

96138
- os: ubuntu-20.04
97139
cmp: gcc
98140
configuration: default
99-
base: "7.0"
100-
rtems: "4.10"
101-
rtems_target: RTEMS-pc386-qemu
141+
name: "Ub-20 gcc + RT-4.10"
142+
102143
test: NO
103-
name: "7.0 Ub-20 gcc-9 + RT-4.10"
104144

105145
- os: ubuntu-20.04
106146
cmp: gcc
107147
configuration: default
108-
base: "7.0"
109-
rtems: "4.9"
110-
rtems_target: RTEMS-pc386-qemu
111-
name: "7.0 Ub-20 gcc-9 + RT-4.9"
148+
name: "Ub-20 gcc + RT-4.9"
149+
112150

113151
- os: macos-latest
114152
cmp: clang
115153
configuration: default
116-
base: "7.0"
117-
name: "7.0 MacOS clang-12"
154+
name: "MacOS clang"
118155

119156
- os: windows-2019
120157
cmp: vs2019
121-
configuration: default
122-
base: "7.0"
123-
name: "7.0 Win2019 MSC-19"
158+
configuration: debug
159+
name: "Win2019 MSC-19"
160+
extra: "CMD_CXXFLAGS=-analysis"
124161

125162
- os: windows-2019
126163
cmp: vs2019
127-
configuration: static
128-
base: "7.0"
129-
name: "7.0 Win2019 MSC-19, static"
164+
configuration: static-debug
165+
name: "Win2019 MSC-19, static"
166+
extra: "CMD_CXXFLAGS=-analysis"
130167

131168
- os: windows-2019
132169
cmp: vs2019
133170
configuration: debug
134-
base: "7.0"
135-
name: "7.0 Win2019 MSC-19, debug"
171+
name: "Win2019 MSC-19, debug"
136172

137173
- os: windows-2019
138174
cmp: gcc
139175
configuration: default
140-
base: "7.0"
141-
name: "7.0 Win2019 mingw"
176+
name: "Win2019 mingw"
177+
178+
# Linux cross builds
179+
180+
- os: ubuntu-latest
181+
cmp: gcc
182+
configuration: default
183+
name: "Cross linux-aarch64"
184+
cross: linux-aarch64
185+
186+
- os: ubuntu-latest
187+
cmp: gcc
188+
configuration: default
189+
name: "Cross linux-arm gnueabi"
190+
cross: linux-arm@arm-linux-gnueabi
191+
192+
- os: ubuntu-latest
193+
cmp: gcc
194+
configuration: default
195+
name: "Cross linux-arm gnueabihf"
196+
cross: linux-arm@arm-linux-gnueabihf
142197

143198
steps:
144-
- uses: actions/checkout@v2
199+
- uses: actions/checkout@v4
145200
with:
146201
submodules: true
147-
- name: Cache Dependencies
148-
uses: actions/cache@v2
149-
with:
150-
path: ~/.cache
151-
key: ${{ matrix.base }}/${{ matrix.os }}/${{ matrix.cmp }}/${{ matrix.configuration }}/${{ matrix.wine }}${{ matrix.rtems }}/${{ matrix.rtems_target }}/${{ matrix.extra }}
152-
- name: Automatic core dump analysis
202+
- name: Automatic core dumper analysis
153203
uses: mdavidsaver/ci-core-dumper@master
154204
- name: "apt-get install"
155205
run: |
@@ -160,6 +210,91 @@ jobs:
160210
run: python .ci/cue.py prepare
161211
- name: Build main module
162212
run: python .ci/cue.py build
213+
- name: Run main module tests
214+
run: python .ci/cue.py -T 60M test
215+
- name: Upload tapfiles Artifact
216+
if: ${{ always() }}
217+
uses: actions/upload-artifact@v4
218+
with:
219+
name: tapfiles ${{ matrix.name }}
220+
path: '**/O.*/*.tap'
221+
if-no-files-found: ignore
222+
- name: Collect and show test results
223+
if: ${{ always() }}
224+
run: python .ci/cue.py -T 5M test-results
225+
226+
docker:
227+
name: ${{ matrix.name }}
228+
runs-on: ubuntu-latest
229+
container:
230+
image: ${{ matrix.image }}
231+
# Set environment variables from matrix parameters
232+
env:
233+
BASE: "7.0"
234+
CMP: ${{ matrix.cmp }}
235+
BCFG: ${{ matrix.configuration }}
236+
EXTRA: ${{ matrix.extra }}
237+
TEST: ${{ matrix.test }}
238+
strategy:
239+
fail-fast: false
240+
matrix:
241+
# Job names also name artifacts, character limitations apply
242+
include:
243+
#- name: "CentOS-7"
244+
# image: centos:7
245+
# cmp: gcc
246+
# configuration: default
247+
248+
- name: "Fedora-33"
249+
image: fedora:33
250+
cmp: gcc
251+
configuration: default
252+
253+
- name: "Fedora-latest"
254+
image: fedora:latest
255+
cmp: gcc
256+
configuration: default
257+
258+
steps:
259+
- name: "Build newer Git"
260+
# actions/checkout@v2 wants git >=2.18
261+
# centos:7 has 1.8
262+
if: matrix.image=='centos:7'
263+
run: |
264+
yum -y install curl make gcc curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
265+
curl https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.29.0.tar.gz | tar -xz
266+
cd git-*
267+
make -j2 prefix=/usr/local all
268+
make prefix=/usr/local install
269+
cd ..
270+
rm -rf git-*
271+
type -a git
272+
git --version
273+
- name: "Redhat setup"
274+
run: |
275+
dnfyum() {
276+
dnf -y "$@" || yum -y "$@"
277+
return $?
278+
}
279+
dnfyum install python3 gdb make perl gcc-c++ glibc-devel readline-devel ncurses-devel perl-devel perl-Test-Simple
280+
git --version || dnfyum install git
281+
# rather than just bite the bullet and link python3 -> python,
282+
# people would rather just break all existing scripts...
283+
[ -e /usr/bin/python ] || ln -sf python3 /usr/bin/python
284+
python --version
285+
- uses: actions/checkout@v4
286+
with:
287+
submodules: true
288+
- name: Automatic core dumper analysis
289+
uses: mdavidsaver/ci-core-dumper@master
290+
if: matrix.image!='centos:7'
291+
- name: Automatic core dumper analysis
292+
uses: mdavidsaver/ci-core-dumper@node16
293+
if: matrix.image=='centos:7'
294+
- name: Prepare and compile dependencies
295+
run: python .ci/cue.py prepare
296+
- name: Build main module
297+
run: python .ci/cue.py build
163298
- name: Run main module tests
164299
run: python .ci/cue.py -T 20M test
165300
- name: Upload tapfiles Artifact

0 commit comments

Comments
 (0)