forked from AndySomogyi/sbmlsolver
-
Notifications
You must be signed in to change notification settings - Fork 25
592 lines (533 loc) · 27.1 KB
/
main.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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
name: BuildRoadRunner
on:
push:
branches:
- develop
pull_request:
branches:
- '**'
jobs:
build_on_OSs:
name: ${{ matrix.platform.name }} roadrunner build
strategy:
fail-fast: false
matrix:
platform:
- name: macos-12-release
os_type: macos
os_name: macos-12
build_type: Release
build_python: ON
- name: macos-12-debug
os_type: macos
os_name: macos-12
build_type: Debug
build_python: OFF
- name: macos-14-release
os_type: macos
os_name: macos-14
build_type: Release
build_python: ON
- name: macos-14-debug
os_type: macos
os_name: macos-14
build_type: Debug
build_python: OFF
- name: ubuntu-latest-release
os_type: ubuntu
os_name: ubuntu-latest
build_type: Release
build_python: ON
- name: ubuntu-latest-debug
os_type: ubuntu
os_name: ubuntu-latest
build_type: Debug
build_python: OFF
- name: windows-latest-release
os_type: windows
os_name: windows-latest
build_type: Release
build_python: ON
- name: windows-latest-debug
os_type: windows
os_name: windows-latest
build_type: Debug
build_python: OFF
- name: manylinux_2_28-release
os_type: manylinux
os_name: ubuntu-latest
container_image: quay.io/pypa/manylinux_2_28_x86_64
build_type: Release
build_python: ON
libroadrunner_deps_owner: [ "sys-bio" ]
libroadrunner_deps_repo: [ "libroadrunner-deps" ]
libroadrunner_deps_name: [ "libroadrunner-deps" ]
libroadrunner_deps_release_version: [ "v2.1.2" ]
llvm_owner: [ "sys-bio" ]
llvm_repo: [ "llvm-13.x" ]
llvm_name: [ "llvm-13.x" ]
llvm_release_version: [ "v13.1" ]
build_tests: [ON]
build_plugins: [ON]
runs-on: ${{ matrix.platform.os_name }}
container:
image: ${{ matrix.platform.container_image || '' }}
steps:
- name: Setup python versions
shell: bash
# v1 should be the earliest supported version, and v4 the latest. Tests are only run on v1 and v4.
run: |
echo "python_v1=3.10" >> $GITHUB_ENV
echo "python_v2=3.11" >> $GITHUB_ENV
# echo "python_v3=3.12" >> $GITHUB_ENV
echo "python_v4=3.12" >> $GITHUB_ENV
echo "python_v1_name=v1" >> $GITHUB_ENV
echo "python_v2_name=v2" >> $GITHUB_ENV
# echo "python_v3_name=v3" >> $GITHUB_ENV
echo "python_v4_name=v4" >> $GITHUB_ENV
- name: Checkout RoadRunner
if: matrix.platform.os_type == 'manylinux'
uses: actions/checkout@v4
- name: Checkout RoadRunner
if: matrix.platform.os_type != 'manylinux'
uses: actions/checkout@v4
- name: Setup Python for non-Manylinux platforms
if: matrix.platform.build_python == 'ON' && matrix.platform.os_type != 'manylinux'
uses: actions/setup-python@v4
id: four_pythons
with:
python-version: |
${{ env.python_v1 }}
${{ env.python_v2 }}
${{ env.python_v4 }}
- name: Setup Python for Manylinux platforms
if: matrix.platform.build_python == 'ON' && matrix.platform.os_type == 'manylinux'
shell: bash
run: |
dnf install -y wget
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p /Miniconda3
/Miniconda3/bin/conda create -y --name ${{ env.python_v1_name }} python=${{ env.python_v1 }}
/Miniconda3/bin/conda create -y --name ${{ env.python_v2_name }} python=${{ env.python_v2 }}
/Miniconda3/bin/conda create -y --name ${{ env.python_v3_name }} python=${{ env.python_v3 }}
/Miniconda3/bin/conda create -y --name ${{ env.python_v4_name }} python=${{ env.python_v4 }}
/Miniconda3/bin/conda init && bash ~/.bashrc && . ~/.bashrc cd ${RUNNER_WORKSPACE}
# sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure
echo "python_v1_exe=/Miniconda3/envs/${{ env.python_v1_name }}/bin/python" >> $GITHUB_ENV
echo "python_v1_dir=/Miniconda3/envs/${{ env.python_v1_name }}" >> $GITHUB_ENV
echo "python_v2_exe=/Miniconda3/envs/${{ env.python_v2_name }}/bin/python" >> $GITHUB_ENV
echo "python_v2_dir=/Miniconda3/envs/${{ env.python_v2_name }}" >> $GITHUB_ENV
# echo "python_v3_exe=/Miniconda3/envs/${{ env.python_v3_name }}/bin/python" >> $GITHUB_ENV
# echo "python_v3_dir=/Miniconda3/envs/${{ env.python_v3_name }}" >> $GITHUB_ENV
echo "python_v4_exe=/Miniconda3/envs/${{ env.python_v4_name }}/bin/python" >> $GITHUB_ENV
echo "python_v4_dir=/Miniconda3/envs/${{ env.python_v4_name }}" >> $GITHUB_ENV
- name: Setup Windows Python paths
if: matrix.platform.build_python == 'ON' && matrix.platform.os_type == 'windows'
run: |
cd ${{ env.pythonLocation }}
$pattern = '[\\]'
cd ../../${{ env.python_v1 }}*/x64/
$pythonWinExecutable = $(realpath .)
$pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/'
echo "python_v1_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "python_v1_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append
cd ../../${{ env.python_v2 }}*/x64/
$pythonWinExecutable = $(realpath .)
$pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/'
echo "python_v2_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "python_v2_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append
#cd ../../${{ env.python_v3 }}*/x64/
#$pythonWinExecutable = $(realpath .)
#$pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/'
#echo "python_v3_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
#echo "python_v3_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append
cd ../../${{ env.python_v4 }}*/x64/
$pythonWinExecutable = $(realpath .)
$pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/'
echo "python_v4_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "python_v4_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Setup non-windows Python paths
if: matrix.platform.build_python == 'ON' && matrix.platform.os_type != 'windows' && matrix.platform.os_type != 'manylinux'
shell: bash
run: |
cd ${{ env.pythonLocation }}
export py_lastdir="$(basename $PWD)"
cd ../../${{ env.python_v1 }}*/$py_lastdir/
ls
echo "python_v1_exe=$PWD/python" >> $GITHUB_ENV
echo "python_v1_dir=$PWD" >> $GITHUB_ENV
cd ../../${{ env.python_v2 }}*/$py_lastdir/
echo "python_v2_exe=$PWD/python" >> $GITHUB_ENV
echo "python_v2_dir=$PWD" >> $GITHUB_ENV
#cd ../../${{ env.python_v3 }}*/$py_lastdir/
#echo "python_v3_exe=$PWD/python" >> $GITHUB_ENV
#echo "python_v3_dir=$PWD" >> $GITHUB_ENV
cd ../../${{ env.python_v4 }}*/$py_lastdir/
echo "python_v4_exe=$PWD/python" >> $GITHUB_ENV
echo "python_v4_dir=$PWD" >> $GITHUB_ENV
- name: Install Python dependencies
if: matrix.platform.build_python == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/roadrunner
${{ env.python_v1_exe }} -m pip install --upgrade pip
${{ env.python_v1_exe }} -m pip install -r ./requirements.txt
${{ env.python_v1_exe }} -m pip install -r ./test-requirements.txt
${{ env.python_v1_exe }} -m pip install build
${{ env.python_v2_exe }} -m pip install --upgrade pip
${{ env.python_v2_exe }} -m pip install -r ./requirements.txt
${{ env.python_v2_exe }} -m pip install -r ./test-requirements.txt
${{ env.python_v2_exe }} -m pip install build
#${{ env.python_v3_exe }} -m pip install --upgrade pip
#${{ env.python_v3_exe }} -m pip install -r ./requirements.txt
#${{ env.python_v3_exe }} -m pip install -r ./test-requirements.txt
#${{ env.python_v3_exe }} -m pip install build
${{ env.python_v4_exe }} -m pip install --upgrade pip
${{ env.python_v4_exe }} -m pip install -r ./requirements.txt
${{ env.python_v4_exe }} -m pip install -r ./test-requirements.txt
${{ env.python_v4_exe }} -m pip install build
# At one point, we needed this on manylinux:
# ${{ env.python_v1_exe }} -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r requirements.txt
- name: Set MSVC as the default compiler on Windows
if: matrix.platform.os_type == 'windows'
uses: ilammy/[email protected]
- name: Upgrade gcc on Linux
if: matrix.platform.os_type == 'manylinux'
shell: bash
run: |
if [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-11 g++-11
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 90
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90
elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then
dnf install -y gcc-toolset-11
scl enable gcc-toolset-11 bash
echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> "${GITHUB_PATH}"
fi
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Get Host Architecture
shell: bash
run: |
architecture=$(uname -m)
echo "host_architecture=$architecture" >> $GITHUB_ENV
if [ "${{ matrix.platform.os_type }}" == 'macos' ]; then
echo "OSX_ARCHITECTURES=$architecture" >> $GITHUB_ENV
fi
- name: Install ccache
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
if [ "${{ matrix.platform.os_type }}" == 'macos' ]; then
brew install ccache
elif [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then
sudo apt-get update
sudo apt-get install -y ccache
elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then
mkdir -p ccache
cd ccache
curl -L https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.gz > ccache.tar.gz
tar -zxf ccache.tar.gz
rm ccache.tar.gz
mkdir -p build-ccache
mkdir -p install-ccache
cd build-ccache
cmake -DCMAKE_INSTALL_PREFIX="$RUNNER_WORKSPACE/ccache/install-ccache" -DCMAKE_BUILD_TYPE=Release ../ccache-4.9.1
cmake --build . --target install
echo "$RUNNER_WORKSPACE/ccache/install-ccache/bin" >> "${GITHUB_PATH}"
fi
- name: Prepare ccache timestamp on non-Windows platforms
if: matrix.platform.os_type != 'windows'
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("timestamp=${current_date}" >> $GITHUB_OUTPUT)
# message("::set-output name=timestamp::${current_date}")
- name: Set ccache cache directory on non-Windows
if: matrix.platform.os_type != 'windows'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
echo "CCACHE_DIR=${RUNNER_WORKSPACE}/.ccache" >> $GITHUB_ENV
echo "COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
- name: Cache ccache files on non-Windows
if: matrix.platform.os_type != 'windows'
uses: actions/cache@v4
with:
path: ${RUNNER_WORKSPACE}/.ccache
key:
${{ runner.os }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
${{ runner.os }}-
- name: Install Swig
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
# running against the latest version of swig fails, os we build version 4.0.2
if [ "${{ matrix.platform.os_type }}" == 'macos' ]; then
brew install pcre pcre2
mkdir -p ${RUNNER_WORKSPACE}/swig
cd swig
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download > swig.tar.gz
tar -zxf swig.tar.gz
rm swig.tar.gz
mkdir -p install-swig
cd swig-4.0.2/
./configure --prefix=${RUNNER_WORKSPACE}/swig/install-swig
make
make install
echo SWIG_DIR="-DSWIG_EXECUTABLE=${RUNNER_WORKSPACE}/swig/install-swig/bin/swig" >> $GITHUB_ENV
elif [ "${{ matrix.platform.os_type }}" == 'windows' ]; then
mkdir -p swig
cd swig
curl -L https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.0.2/swigwin-4.0.2.zip/download > swig.zip
unzip -q swig.zip -d install-swig
rm swig.zip
echo SWIG_DIR="-DSWIG_EXECUTABLE=${RUNNER_WORKSPACE}/swig/install-swig/swigwin-4.0.2/" >> "${GITHUB_PATH}"
elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then
dnf install -y pcre-devel
mkdir -p swig
cd swig
curl -L https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download > swig.tar.gz
tar -zxf swig.tar.gz
rm swig.tar.gz
mkdir -p install-swig
cd swig-4.0.2/
./configure --disable-dependency-tracking --prefix=${RUNNER_WORKSPACE}/swig/install-swig
make
make install
echo SWIG_DIR="-DSWIG_EXECUTABLE=${RUNNER_WORKSPACE}/swig/install-swig/bin/swig" >> $GITHUB_ENV
fi
echo PYTHON_DIR="-DPython_ROOT_DIR=${{ env.python_v1_dir }}" >> $GITHUB_ENV
- name: Save standardized os/compiler names
shell: bash
run: |
if [ "${{ matrix.platform.os_type }}" == 'windows' ]; then
compiler_version=$(ls "C:\Program Files\Microsoft Visual Studio")
echo "os_and_compiler=${{ matrix.platform.os_type }}-msvc$compiler_version" >> $GITHUB_ENV
elif [ "${{ matrix.platform.os_type }}" == 'macos' ]; then
os_version=$(sw_vers -productVersion | cut -d '.' -f 1)
echo "os_and_compiler=${{ matrix.platform.os_type }}-${os_version}" >> $GITHUB_ENV
elif [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then
os_version=$(lsb_release -rs | cut -d '.' -f 1)
echo "os_and_compiler=${{ matrix.platform.os_type }}-${os_version}" >> $GITHUB_ENV
elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then
os_name="${{ matrix.platform.name }}"
os_name_without_build_type="${os_name%%-*}"
echo "os_and_compiler=${os_name_without_build_type}" >> $GITHUB_ENV
fi
- name: Download LibRoadRunner Dependencies binaries
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
mkdir -p ${{ matrix.libroadrunner_deps_name }}-binaries
cd ${{ matrix.libroadrunner_deps_name }}-binaries
curl -LO "https://github.com/${{ matrix.libroadrunner_deps_owner }}/${{ matrix.libroadrunner_deps_repo }}/releases/download/${{ matrix.libroadrunner_deps_release_version }}/${{ matrix.libroadrunner_deps_name }}-${{ env.os_and_compiler }}-${{ env.host_architecture }}-${{ matrix.platform.build_type }}.zip"
unzip -q ${{ matrix.libroadrunner_deps_name }}*.zip
rm ${{ matrix.libroadrunner_deps_name }}*.zip
echo RR_DEPENDENCIES_INSTALL_PREFIX="${RUNNER_WORKSPACE}/${{ matrix.libroadrunner_deps_name }}-binaries" >> $GITHUB_ENV
- name: Download LLVM binaries
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
mkdir -p ${{ matrix.llvm_name }}-binaries
cd ${{ matrix.llvm_name }}-binaries
curl -LO "https://github.com/${{ matrix.llvm_owner }}/${{ matrix.llvm_repo }}/releases/download/${{ matrix.llvm_release_version }}/${{ matrix.llvm_name }}-${{ env.os_and_compiler }}-${{ env.host_architecture }}-${{ matrix.platform.build_type }}.zip"
unzip -q ${{ matrix.llvm_name }}*.zip
rm ${{ matrix.llvm_name }}*.zip
echo LLVM_INSTALL_PREFIX="${RUNNER_WORKSPACE}/${{ matrix.llvm_name }}-binaries" >> $GITHUB_ENV
# make llvm-config executable
chmod a+x ${RUNNER_WORKSPACE}/${{ matrix.llvm_name }}-binaries/bin/llvm-config
- name: Create build directory
shell: bash
run: mkdir -p ${RUNNER_WORKSPACE}/build-roadrunner
- name: Configure CMake for RoadRunner
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/build-roadrunner
cmake $GITHUB_WORKSPACE \
-G "Ninja" \
-DCMAKE_C_COMPILER_LAUNCHER=${COMPILER_LAUNCHER} \
-DCMAKE_CXX_COMPILER_LAUNCHER=${COMPILER_LAUNCHER} \
-DCMAKE_BUILD_TYPE=${{ matrix.platform.build_type }} \
-DCMAKE_OSX_ARCHITECTURES=${OSX_ARCHITECTURES} \
-DCMAKE_INSTALL_PREFIX="${RUNNER_WORKSPACE}/install-roadrunner" \
-DRR_DEPENDENCIES_INSTALL_PREFIX=${RR_DEPENDENCIES_INSTALL_PREFIX} \
-DLLVM_INSTALL_PREFIX=${LLVM_INSTALL_PREFIX} \
-DBUILD_TESTS=${{ matrix.build_tests }} \
-DBUILD_RR_PLUGINS=${{ matrix.build_plugins }} \
-DBUILD_PYTHON=${{ matrix.platform.build_python }} \
${{ env.PYTHON_DIR }} \
${{ env.SWIG_DIR }}
- name: Build and install RoadRunner
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/build-roadrunner
cmake --build . --target install --config ${{ matrix.platform.build_type }}
- name: Run C RoadRunner tests
if: matrix.platform.build_type == 'Release' && matrix.build_tests == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/build-roadrunner
# ctest --output-on-failure --verbose --extra-verbose --progress --exclude-regex python_tests
if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then
ctest --output-on-failure --verbose --extra-verbose --progress --exclude-regex python_tests
fi
- name: Run Python Roadrunner tests (first Python version)
if: matrix.platform.build_python == 'ON' && matrix.build_tests == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/build-roadrunner
if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then
ctest -C ${{ matrix.platform.build_type }} --output-on-failure --verbose --extra-verbose --progress --tests-regex python_tests
fi
- name: Save roadrunner version
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/install-roadrunner
ls -l
export rrversion="$(cat VERSION.txt)"
echo "roadrunner_version=$rrversion" >> ${GITHUB_ENV}
- name: Set artifacts path and name
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
echo "artifacts_name=roadrunner-${{ env.roadrunner_version}}-${{ env.os_and_compiler }}-${host_architecture}-${{ matrix.platform.build_type }}" >> $GITHUB_ENV
echo "artifacts_path=${RUNNER_WORKSPACE}/install-roadrunner" >> $GITHUB_ENV
- name: Upload roadrunner binaries
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifacts_name }}
path: ${{ env.artifacts_path }}
- name: Create Python wheel artifacts
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/install-roadrunner
${{ env.python_v1_exe }} -m build --wheel
rm -r -f build
mv setup_rrplugins.py setup.py
${{ env.python_v1_exe }} -m build --wheel
rm -r -f build
- name: Rename Python wheel artifacts
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
shell: bash
run: |
mkdir ${RUNNER_WORKSPACE}/wheels/
cd ${RUNNER_WORKSPACE}/install-roadrunner/dist
if compgen -G "*universal*whl" > /dev/null; then
mv libroadrunner*universal*.whl $(echo libroadrunner*universal*.whl | sed "s/universal2/${host_architecture}/g")
mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g")
elif compgen -G "*-linux*whl" > /dev/null; then
mv libroadrunner*-linux*.whl $(echo libroadrunner*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
fi
mv * ${RUNNER_WORKSPACE}/wheels/
- name: Rebuild RoadRunner with second Python version
if: matrix.platform.build_python == 'ON'
shell: bash
run: |
rm -r -f ${RUNNER_WORKSPACE}/install-roadrunner
cd ${RUNNER_WORKSPACE}/build-roadrunner
cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v2_dir }}
cmake --build . --target install --config ${{ matrix.platform.build_type }}
- name: Create second Python wheel artifacts and rename
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/install-roadrunner
${{ env.python_v2_exe }} -m build --wheel
rm -r -f build
mv setup_rrplugins.py setup.py
${{ env.python_v2_exe }} -m build --wheel
rm -r -f build
cd ${RUNNER_WORKSPACE}/install-roadrunner/dist
if compgen -G "*universal*whl" > /dev/null; then
mv libroadrunner*universal*.whl $(echo libroadrunner*universal*.whl | sed "s/universal2/${host_architecture}/g")
mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g")
elif compgen -G "*-linux*whl" > /dev/null; then
mv libroadrunner*-linux*.whl $(echo libroadrunner*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
fi
mv * ${RUNNER_WORKSPACE}/wheels/
# - name: Rebuild RoadRunner with third Python version
# if: matrix.platform.build_python == 'ON'
# shell: bash
# run: |
# rm -r -f ${RUNNER_WORKSPACE}/install-roadrunner
# cd ${RUNNER_WORKSPACE}/build-roadrunner
# cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v3_dir }}
# cmake --build . --target install --config ${{ matrix.platform.build_type }}
# - name: Create third Python wheel artifacts and rename
# if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
# shell: bash
# run: |
# cd ${RUNNER_WORKSPACE}/install-roadrunner
# ${{ env.python_v3_exe }} -m build --wheel
# rm -r -f build
# mv setup_rrplugins.py setup.py
# ${{ env.python_v3_exe }} -m build --wheel
# rm -r -f build
# cd ${RUNNER_WORKSPACE}/install-roadrunner/dist
# if compgen -G "*universal*whl" > /dev/null; then
# mv libroadrunner*universal*.whl $(echo libroadrunner*universal*.whl | sed "s/universal2/${host_architecture}/g")
# mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g")
# elif compgen -G "*-linux*whl" > /dev/null; then
# mv libroadrunner*-linux*.whl $(echo libroadrunner*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
# mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
# fi
# mv * ${RUNNER_WORKSPACE}/wheels/
- name: Rebuild RoadRunner with fourth Python version
if: matrix.platform.build_python == 'ON'
shell: bash
run: |
rm -r -f ${RUNNER_WORKSPACE}/install-roadrunner
cd ${RUNNER_WORKSPACE}/build-roadrunner
cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v4_dir }}
cmake --build . --target install --config ${{ matrix.platform.build_type }}
- name: Run Python Roadrunner tests (fourth Python version)
if: matrix.platform.build_python == 'ON' && matrix.build_tests == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/build-roadrunner
if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then
ctest -C ${{ matrix.platform.build_type }} --output-on-failure --verbose --extra-verbose --progress --tests-regex python_tests
fi
- name: Create fourth Python wheel artifacts and rename
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}/install-roadrunner
${{ env.python_v4_exe }} -m build --wheel
rm -r -f build
mv setup_rrplugins.py setup.py
${{ env.python_v4_exe }} -m build --wheel
rm -r -f build
cd ${RUNNER_WORKSPACE}/install-roadrunner/dist
if compgen -G "*universal*whl" > /dev/null; then
mv libroadrunner*universal*.whl $(echo libroadrunner*universal*.whl | sed "s/universal2/${host_architecture}/g")
mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g")
elif compgen -G "*-linux*whl" > /dev/null; then
mv libroadrunner*-linux*.whl $(echo libroadrunner*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g")
fi
mv * ${RUNNER_WORKSPACE}/wheels/
- name: Set Python wheel artifacts path and name
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
shell: bash
run: |
cd ${RUNNER_WORKSPACE}
echo "roadrunner_python_wheel_artifacts_name=roadrunner-$roadrunner_version-python-wheels-${{ env.os_and_compiler }}-${host_architecture}" >> $GITHUB_ENV
echo "roadrunner_python_wheel_artifacts_file=${RUNNER_WORKSPACE}/wheels/" >> ${GITHUB_ENV}
- name: Upload RoadRunner Python wheel artifacts
if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON'
uses: actions/upload-artifact@v3
with:
name: ${{ env.roadrunner_python_wheel_artifacts_name }}
path: ${{ env.roadrunner_python_wheel_artifacts_file }}