-
Notifications
You must be signed in to change notification settings - Fork 2
297 lines (264 loc) · 9.93 KB
/
Copy pathbuild.yml
File metadata and controls
297 lines (264 loc) · 9.93 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
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
name: Smoke Test
run-name: ${{ github.event_name == 'workflow_dispatch' && 'Manual:' || '' }} ${{ inputs.run_name }}
on:
push:
paths-ignore: &paths_ignore
- 'docs/**'
- '**.txt'
- '**.md'
- 'ChangeLog'
- '**/README*'
- 'mpi-conduit/contrib/mpirun_h/**'
- 'other/contrib/cross-configure-*'
- 'other/valgrind/*.supp'
pull_request:
paths-ignore: *paths_ignore
workflow_dispatch:
inputs:
run_name:
description: 'Descriptive name for this run'
type: string
required: false
configure_args:
description: 'Additional configure arguments'
type: string
required: false
test_list:
description: 'Conduit tests to run (or "all")'
type: string
default: 'testgasnet testinternal testthreads'
required: true
test_nodes:
description: 'Test process count'
type: integer
default: 4
required: true
env_vars:
description: 'Environment vars: k1=v1 k2=v2'
type: string
default: ''
required: false
concurrency:
# De-duplicate concurrent workflow runs on the same branch/ref
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}-${{ ( github.event_name == 'workflow_dispatch' && github.run_id ) || 'auto' }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' &&
github.ref != 'refs/heads/stable' &&
github.ref != 'refs/heads/develop' }}
jobs:
build:
name: ${{ matrix.compiler }}-${{ matrix.version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash --noprofile --norc -e -x -o pipefail {0}
strategy:
fail-fast: false
matrix:
os: [ macos-14, macos-15, macos-15-intel, macos-26, macos-26-intel, ubuntu-24.04 ]
compiler: [ gcc ]
version: [ 12, 13, 14, 15, 16 ]
extra_flags: [ -g ]
include:
- os: ubuntu-22.04
compiler: gcc
version: 12 # no package available for gcc 13+
# --- LLVM clang coverage ---
- os: macos-14
compiler: clang
version: 22
- os: macos-15
compiler: clang
version: 22
- os: macos-15-intel
compiler: clang
version: 22
- os: macos-26
compiler: clang
version: 22
- os: macos-26-intel
compiler: clang
version: 22
# https://hub.docker.com/r/phhargrove/llvm-flang/tags
- os: ubuntu-24.04
compiler: clang
version: 22
container: phhargrove/llvm-flang:22.1.0-latest
- os: ubuntu-24.04
compiler: clang
version: 21
container: phhargrove/llvm-flang:21.1.0-latest
- os: ubuntu-24.04
compiler: clang
version: 20
container: phhargrove/llvm-flang:20.1.0-latest
- os: ubuntu-24.04
compiler: clang
version: 19
extra_flags: -g -mmlir -allow-assumed-rank
container: phhargrove/llvm-flang:19.1.1-latest
# --- Intel coverage ---
# https://hub.docker.com/r/intel/oneapi-hpckit/tags
- os: ubuntu-24.04
compiler: icx
version: latest
container: intel/oneapi-hpckit:latest
- os: ubuntu-24.04
compiler: icx
version: 2025.2.0
container: intel/oneapi-hpckit:2025.2.0-0-devel-ubuntu24.04
- os: ubuntu-24.04
compiler: icx
version: 2025.1.0
container: intel/oneapi-hpckit:2025.1.0-0-devel-ubuntu24.04
- os: ubuntu-22.04
compiler: icx
version: 2025.0.0
container: intel/oneapi-hpckit:2025.0.0-0-devel-ubuntu22.04
container:
image: ${{ matrix.container }}
options: --shm-size=2gb
env:
COMPILER_VERSION: ${{ matrix.version }}
CC: ${{ matrix.compiler }}
CFLAGS: ${{ matrix.extra_flags }}
CONFIGURE_ARGS: --disable-mpi-compat --enable-rpath --enable-debug ${{ inputs.configure_args }}
GASNET_BACKTRACE: 1
GASNET_SPAWN_VERBOSE: 1
GASNET_VERBOSEENV: 1
GASNET_SPAWNFN: L
GASNET_MASTERIP: 127.0.0.1
GASNET_TEST_TIME_SLACK: 0.1
MAKE_FLAGS: -j 4
TEST_NODES: ${{ inputs.test_nodes || 4 }}
TEST_FILTER: |-
${{ case( github.event_name == 'workflow_dispatch' && inputs.test_list != 'all',
format('TESTS={0}', inputs.test_list),
github.event_name == 'workflow_dispatch', '_dummy_TESTS=all',
'TESTS=testgasnet testinternal testthreads'
) }}
ERR_CHECK: '! grep -q -e "\bERROR" -e "Caught a signal" -e "Caught a fatal signal" -e ": command not found" -e "No such file or directory"'
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Ubuntu Native Dependencies
if: ${{ contains(matrix.os, 'ubuntu') && matrix.container == '' && matrix.compiler == 'gcc' }}
run: |
sudo apt update
#sudo apt list -a 'gcc-*'
sudo apt install -y build-essential autoconf2.69 automake
if [[ ${COMPILER_VERSION} -lt 15 ]] ; then
sudo apt install -y gcc-${COMPILER_VERSION}
else
curl -L https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o install-homebrew.sh
chmod +x install-homebrew.sh
env CI=1 ./install-homebrew.sh
HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
sudo ${HOMEBREW_PREFIX}/bin/brew setup-sandbox
${HOMEBREW_PREFIX}/bin/brew install -v gcc@${COMPILER_VERSION} binutils
ls -al ${HOMEBREW_PREFIX}/bin
echo "PATH=${HOMEBREW_PREFIX}/bin:${PATH}" >> "$GITHUB_ENV"
: Homebrew GCC@15 needs binutils 2.44+
HOMEBREW_BINUTILS=$(ls -d ${HOMEBREW_PREFIX}/Cellar/binutils/2.*/bin )
ls -al ${HOMEBREW_BINUTILS}
echo "FFLAGS=$FFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV"
echo "CFLAGS=$CFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV"
echo "CXXFLAGS=$CXXFLAGS -B ${HOMEBREW_BINUTILS}" >> "$GITHUB_ENV"
fi
- name: Install Ubuntu Container Dependencies
if: ${{ contains(matrix.os, 'ubuntu') && matrix.container != '' }}
run: |
apt update
apt install -y build-essential autoconf2.69 automake
- name: Install macOS Dependencies
if: contains(matrix.os, 'macos')
run: |
# silence Homebrew tap trust warnings:
(set +e ; brew untap -f aws/tap hashicorp/tap 2>&1 | perl -pe 's/#*.warning./warn: /' ; brew trust azure/bicep )
brew update
brew install automake # autoconf
if [[ "${{ matrix.compiler }}@${{ matrix.version }}" == gcc@12 ]] ; then
brew install gcc@12
fi
if [[ ${{ matrix.compiler }} == 'gcc' && ${COMPILER_VERSION} -gt 15 ]] ; then
brew install gcc@${COMPILER_VERSION}
fi
- name: Install LLVM on macOS
if: contains(matrix.os, 'macos') && matrix.compiler == 'clang'
run: |
brew install llvm@${COMPILER_VERSION}
# Prepend homebrew clang to PATH:
echo "PATH=$(brew --prefix)/opt/llvm/bin:${PATH}" >> "$GITHUB_ENV"
- name: Setup Compilers
run: |
if test "$CC" = "clang" ; then
echo "CXX=clang++" >> "$GITHUB_ENV"
elif test "$CC" = "icx" ; then
echo "CXX=icpx" >> "$GITHUB_ENV"
else
echo "CC=gcc-${COMPILER_VERSION}" >> "$GITHUB_ENV"
echo "CXX=g++-${COMPILER_VERSION}" >> "$GITHUB_ENV"
# XCode 26 / gcc bug workaround:
# <mach/mach_time.h> generates xnu_static_assert_struct_size errors from <mach/message.h>
if [[ ${{ matrix.os }} =~ macos-26 ]] ; then
echo "CONFIGURE_ARGS=$CONFIGURE_ARGS --enable-force-posix-realtime" >> "$GITHUB_ENV"
fi
fi
- name: Set Workflow Dispatch Environment
if: github.event_name == 'workflow_dispatch'
run: |
for setting in ${{ inputs.env_vars }}; do
echo $setting >> "$GITHUB_ENV"
done
- name: Version info
run: |
set +x
echo == Platform version info ==
uname -a
if test -r /etc/os-release ; then grep -e NAME -e VERSION /etc/os-release ; fi
if test -x /usr/bin/sw_vers ; then /usr/bin/sw_vers ; fi
if test -d /dev/shm ; then df -h /dev/shm ; fi
echo
echo == Tool version info ==
echo PATH="$PATH"
for tool in ${CC} ${CXX} make ; do
( echo ; set -x ; w=$(which $tool) ; ls -al $w ; ls -alhL $w ; $tool --version )
done
- name: Bootstrap
run: |
./Bootstrap
- name: configure
run: |
./configure --prefix=$PWD/inst ${CONFIGURE_ARGS}
- name: make all
run: |
make ${MAKE_FLAGS} all
- name: make install
run: |
make ${MAKE_FLAGS} install
- name: make check
run: |
make ${MAKE_FLAGS} check 2>&1 | tee output
eval $ERR_CHECK output
mv smp-conduit/testtools .
rm -f */testtools
- name: Run smp-conduit tests
run: |
make ${MAKE_FLAGS} -C smp-conduit run-tests TEST_NODES=${TEST_NODES} "${TEST_FILTER}" 2>&1 | tee output
grep -q -e 'Test results: 0 failures' output
eval $ERR_CHECK output
- name: Run udp-conduit tests
run: |
if [[ -z "$GASNET_SUPERNODE_MAXSIZE" ]] ; then
if [[ ${TEST_NODES} > 2 ]] ; then
export GASNET_SUPERNODE_MAXSIZE=2
else
export GASNET_SUPERNODE_MAXSIZE=1
fi
fi
make ${MAKE_FLAGS} -C udp-conduit run-tests TEST_NODES=${TEST_NODES} "${TEST_FILTER}" 2>&1 | tee output
grep -q -e 'Test results: 0 failures' output
eval $ERR_CHECK output
- name: Run testtools
run: |
./testtools 2>&1 | tee output
eval $ERR_CHECK output