1
- name : Unix
1
+ name : OSX
2
2
3
3
on :
4
4
pull_request :
22
22
fail-fast : false
23
23
matrix :
24
24
include :
25
- - name : ubu22-x86-gcc12-clang-repl-19
26
- os : ubuntu-22.04
27
- compiler : gcc-12
28
- clang-runtime : ' 19'
29
- cling : Off
30
- cppyy : On
31
- llvm_enable_projects : " clang"
32
- llvm_targets_to_build : " host;NVPTX"
33
- - name : ubu22-x86-gcc12-clang-repl-18
34
- os : ubuntu-22.04
35
- compiler : gcc-12
36
- clang-runtime : ' 18'
37
- cling : Off
38
- cppyy : On
39
- llvm_enable_projects : " clang"
40
- llvm_targets_to_build : " host;NVPTX"
41
- - name : ubu22-x86-gcc12-clang-repl-17
42
- os : ubuntu-22.04
43
- compiler : gcc-12
44
- clang-runtime : ' 17'
45
- cling : Off
46
- cppyy : On
47
- llvm_enable_projects : " clang"
48
- llvm_targets_to_build : " host;NVPTX"
49
- - name : ubu22-x86-gcc12-clang-repl-16
50
- os : ubuntu-22.04
51
- compiler : gcc-12
52
- clang-runtime : ' 16'
53
- cling : Off
54
- cppyy : On
55
- llvm_enable_projects : " clang"
56
- llvm_targets_to_build : " host;NVPTX"
57
- - name : ubu22-x86-gcc9-clang13-cling
58
- os : ubuntu-22.04
59
- compiler : gcc-9
60
- clang-runtime : ' 13'
61
- cling : On
62
- cling-version : ' 1.0'
63
- cppyy : On
64
- llvm_enable_projects : " clang"
65
- llvm_targets_to_build : " host;NVPTX"
66
25
- name : osx15-arm-clang-clang-repl-19
67
26
os : macos-15
68
27
compiler : clang
@@ -156,7 +115,7 @@ jobs:
156
115
with :
157
116
python-version : ' 3.11'
158
117
159
- - name : Save PR Info on Unix systems
118
+ - name : Save PR Info
160
119
run : |
161
120
mkdir -p ./pr
162
121
echo ${{ github.event.number }} > ./pr/NR
@@ -186,44 +145,15 @@ jobs:
186
145
key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
187
146
lookup-only : true
188
147
189
- - name : Setup default Build Type on *nux
148
+ - name : Setup default Build Type
190
149
if : ${{ steps.cache.outputs.cache-hit != 'true' }}
191
150
run : |
192
151
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
193
152
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
194
- os="${{ matrix.os }}"
195
- if [[ "${os}" == "macos"* ]]; then
196
- echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
197
- else
198
- echo "ncpus=$(nproc --all)" >> $GITHUB_ENV
199
- fi
200
-
201
- - name : Setup compiler on Linux
202
- if : ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
203
- run : |
204
- # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
205
- vers="${compiler#*-}"
206
- os_codename="`cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2`"
207
- ##sudo apt update
208
- if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
209
- sudo apt install -y gcc-${vers} g++-${vers} lld
210
- echo "CC=gcc-${vers}" >> $GITHUB_ENV
211
- echo "CXX=g++-${vers}" >> $GITHUB_ENV
212
- else
213
- if ! sudo apt install -y clang-${vers}; then
214
- curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
215
- echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-${vers} main" | sudo tee -a /etc/apt/sources.list
216
- sudo apt-get update
217
- sudo apt-get install -y clang-${vers}
218
- fi
219
- echo "CC=clang-${vers}" >> $GITHUB_ENV
220
- echo "CXX=clang++-${vers}" >> $GITHUB_ENV
221
- fi
222
- env :
223
- compiler : ${{ matrix.compiler }}
153
+ echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
224
154
225
- - name : Setup compiler on macOS
226
- if : ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
155
+ - name : Setup compiler
156
+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
227
157
run : |
228
158
vers="${compiler#*-}"
229
159
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
@@ -259,17 +189,8 @@ jobs:
259
189
env :
260
190
compiler : ${{ matrix.compiler }}
261
191
262
- - name : Install deps on Linux
263
- if : ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
264
- run : |
265
- # Install deps
266
- sudo apt-get update
267
- sudo apt-get install valgrind
268
- sudo apt-get autoremove
269
- sudo apt-get clean
270
-
271
- - name : Install deps on MacOS
272
- if : ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
192
+ - name : Install deps
193
+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
273
194
run : |
274
195
brew update
275
196
export ARCHITECHURE=$(uname -m)
@@ -286,7 +207,7 @@ jobs:
286
207
brew upgrade openssl >/dev/null 2>&1
287
208
brew upgrade
288
209
289
- - name : Build LLVM/Cling on Unix systems if the cache is invalid
210
+ - name : Build LLVM/Cling if the cache is invalid
290
211
if : ${{ steps.cache.outputs.cache-hit != 'true' }}
291
212
run : |
292
213
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
@@ -378,45 +299,6 @@ jobs:
378
299
fail-fast : false
379
300
matrix :
380
301
include :
381
- - name : ubu22-x86-gcc12-clang-repl-19-docs
382
- os : ubuntu-22.04
383
- compiler : gcc-12
384
- clang-runtime : ' 19'
385
- cling : Off
386
- cppyy : Off
387
- documentation : On
388
- - name : ubu22-x86-gcc12-clang-repl-19-cppyy
389
- os : ubuntu-22.04
390
- compiler : gcc-12
391
- clang-runtime : ' 19'
392
- cling : Off
393
- cppyy : On
394
- coverage : true
395
- - name : ubu22-x86-gcc12-clang-repl-18-cppyy
396
- os : ubuntu-22.04
397
- compiler : gcc-12
398
- clang-runtime : ' 18'
399
- cling : Off
400
- cppyy : On
401
- - name : ubu22-x86-gcc12-clang-repl-17-cppyy
402
- os : ubuntu-22.04
403
- compiler : gcc-12
404
- clang-runtime : ' 17'
405
- cling : Off
406
- cppyy : On
407
- - name : ubu22-x86-gcc12-clang-repl-16
408
- os : ubuntu-22.04
409
- compiler : gcc-12
410
- clang-runtime : ' 16'
411
- cling : Off
412
- cppyy : Off
413
- - name : ubu22-x86-gcc9-clang13-cling-cppyy
414
- os : ubuntu-22.04
415
- compiler : gcc-9
416
- clang-runtime : ' 13'
417
- cling : On
418
- cling-version : ' 1.0'
419
- cppyy : On
420
302
- name : osx15-arm-clang-clang-repl-19-cppyy
421
303
os : macos-15
422
304
compiler : clang
@@ -490,7 +372,7 @@ jobs:
490
372
with :
491
373
python-version : ' 3.11'
492
374
493
- - name : Save PR Info on Unix systems
375
+ - name : Save PR Info
494
376
run : |
495
377
mkdir -p ./pr
496
378
echo ${{ github.event.number }} > ./pr/NR
@@ -510,43 +392,13 @@ jobs:
510
392
echo "CLING_HASH=$CLING_HASH" >> $GITHUB_ENV
511
393
echo "LLVM_HASH=$LLVM_HASH" >> $GITHUB_ENV
512
394
513
- - name : Setup default Build Type on *nux
395
+ - name : Setup default Build Type
514
396
run : |
515
397
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
516
398
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
517
- os="${{ matrix.os }}"
518
- if [[ "${os}" == "macos"* ]]; then
519
- echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
520
- else
521
- echo "ncpus=$(nproc --all)" >> $GITHUB_ENV
522
- fi
399
+ echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
523
400
524
- - name : Setup compiler on Linux
525
- if : runner.os == 'Linux'
526
- run : |
527
- # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
528
- vers="${compiler#*-}"
529
- os_codename="`cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2`"
530
- ##sudo apt update
531
- if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
532
- sudo apt install -y gcc-${vers} g++-${vers} lld
533
- echo "CC=gcc-${vers}" >> $GITHUB_ENV
534
- echo "CXX=g++-${vers}" >> $GITHUB_ENV
535
- else
536
- if ! sudo apt install -y clang-${vers}; then
537
- curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
538
- echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-${vers} main" | sudo tee -a /etc/apt/sources.list
539
- sudo apt-get update
540
- sudo apt install -y clang-${vers}
541
- fi
542
- echo "CC=clang-${vers}" >> $GITHUB_ENV
543
- echo "CXX=clang++-${vers}" >> $GITHUB_ENV
544
- fi
545
- env :
546
- compiler : ${{ matrix.compiler }}
547
-
548
- - name : Setup compiler on macOS
549
- if : runner.os == 'macOS'
401
+ - name : Setup compiler
550
402
run : |
551
403
vers="${compiler#*-}"
552
404
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
@@ -582,22 +434,7 @@ jobs:
582
434
env :
583
435
compiler : ${{ matrix.compiler }}
584
436
585
- - name : Install deps on Linux
586
- if : runner.os == 'Linux'
587
- run : |
588
- # Install deps
589
- sudo apt-get update
590
- sudo apt-get install git g++ debhelper devscripts gnupg python3 doxygen graphviz python3-sphinx
591
- sudo apt-get install -y libc6-dbg
592
- sudo snap install valgrind --classic
593
- sudo apt autoremove
594
- sudo apt clean
595
- # Install libraries used by the cppyy test suite
596
- sudo apt install libeigen3-dev
597
- sudo apt install libboost-all-dev
598
-
599
- - name : Install deps on MacOS
600
- if : runner.os == 'macOS'
437
+ - name : Install deps
601
438
run : |
602
439
brew update --force
603
440
export ARCHITECHURE=$(uname -m)
@@ -627,14 +464,7 @@ jobs:
627
464
${{ matrix.cling=='On' && 'cling' || '' }}
628
465
key : ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
629
466
630
- - name : Setup code coverage
631
- if : ${{ success() && (matrix.coverage == true) }}
632
- run : |
633
- sudo apt install lcov
634
- echo "CODE_COVERAGE=1" >> $GITHUB_ENV
635
- echo "BUILD_TYPE=Debug" >> $GITHUB_ENV
636
-
637
- - name : Build and Test/Install CppInterOp on Unix systems
467
+ - name : Build and Test/Install CppInterOp
638
468
run : |
639
469
LLVM_DIR="$(pwd)/llvm-project"
640
470
LLVM_BUILD_DIR="$(pwd)/llvm-project/build"
@@ -678,17 +508,7 @@ jobs:
678
508
-DLLVM_ENABLE_WERROR=On \
679
509
../
680
510
fi
681
- os="${{ matrix.os }}"
682
- docs_on=$(echo "${{ matrix.documentation }}" | tr '[:lower:]' '[:upper:]')
683
- if [[ "${docs_on}" == "ON" ]]; then
684
- cmake --build . --target doxygen-cppinterop --parallel ${{ env.ncpus }}
685
- cmake --build . --target sphinx-cppinterop --parallel ${{ env.ncpus }}
686
- else
687
- cmake --build . --target check-cppinterop --parallel ${{ env.ncpus }}
688
- if [[ ("${os}" == "ubuntu"*) ]]; then
689
- valgrind --show-error-list=yes --track-origins=yes --error-exitcode=1 unittests/CppInterOp/CppInterOpTests
690
- fi
691
- fi
511
+ cmake --build . --target check-cppinterop --parallel ${{ env.ncpus }}
692
512
cd ..
693
513
# We need CB_PYTHON_DIR later
694
514
echo "CB_PYTHON_DIR=$CB_PYTHON_DIR" >> $GITHUB_ENV
@@ -698,27 +518,7 @@ jobs:
698
518
echo "LLVM_BUILD_DIR=$LLVM_BUILD_DIR" >> $GITHUB_ENV
699
519
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
700
520
701
- - name : Prepare code coverage report
702
- if : ${{ success() && (matrix.coverage == true) }}
703
- run : |
704
- # Create lcov report
705
- # capture coverage info
706
- vers="${CC#*-}"
707
- lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
708
- lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
709
- # output coverage data for debugging (optional)
710
- lcov --list coverage.info
711
-
712
- - name : Upload to codecov.io
713
- if : ${{ success() && (matrix.coverage == true) }}
714
- uses : codecov/codecov-action@v4
715
- with :
716
- file : ./coverage.info
717
- fail_ci_if_error : true
718
- verbose : true
719
- token : ${{ secrets.CODECOV_TOKEN }}
720
-
721
- - name : Build and Install cppyy-backend on Unix Systems
521
+ - name : Build and Install cppyy-backend
722
522
if : ${{ matrix.cppyy == 'On' }}
723
523
run : |
724
524
# Download cppyy-backend
@@ -730,15 +530,10 @@ jobs:
730
530
# Build and Install cppyy-backend
731
531
cmake -DCppInterOp_DIR=$CPPINTEROP_DIR ..
732
532
cmake --build . --parallel ${{ env.ncpus }}
733
- OS=$(uname -s)
734
- if [[ "$OS" == "Darwin" ]]; then
735
- cp libcppyy-backend.dylib $CPPINTEROP_DIR/lib/
736
- else
737
- cp libcppyy-backend.so $CPPINTEROP_DIR/lib/
738
- fi
533
+ cp libcppyy-backend.dylib $CPPINTEROP_DIR/lib/
739
534
cd ..
740
535
741
- - name : Install CPyCppyy on Unix Systems
536
+ - name : Install CPyCppyy
742
537
if : ${{ matrix.cppyy == 'On' }}
743
538
run : |
744
539
python3 -m venv .venv
@@ -754,7 +549,7 @@ jobs:
754
549
cd ../..
755
550
# We need CPYCPPYY_DIR later
756
551
echo "CPYCPPYY_DIR=$CPYCPPYY_DIR" >> $GITHUB_ENV
757
- - name : Install cppyy on Unix Systems
552
+ - name : Install cppyy
758
553
if : ${{ matrix.cppyy == 'On' }}
759
554
run : |
760
555
# source virtual environment
@@ -764,7 +559,7 @@ jobs:
764
559
cd cppyy
765
560
python -m pip install --upgrade . --no-deps
766
561
cd ..
767
- - name : Run cppyy on Unix Systems
562
+ - name : Run cppyy
768
563
if : ${{ matrix.cppyy == 'On' }}
769
564
run : |
770
565
# Run cppyy
@@ -773,7 +568,7 @@ jobs:
773
568
python -c "import cppyy"
774
569
# We need PYTHONPATH later
775
570
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
776
- - name : Run the tests on Unix Systems
571
+ - name : Run the tests
777
572
if : ${{ matrix.cppyy == 'On' }}
778
573
run : |
779
574
# Run the tests
@@ -811,14 +606,6 @@ jobs:
811
606
declare -i RETCODE=0
812
607
813
608
set -o pipefail
814
- if [[ "${{ matrix.os }}" == macos-* ]]; then
815
- echo "Skipping Valgrind checks on OS X"
816
- else
817
- echo "Running valgrind on passing tests"
818
- CLANG_VERSION="${{ matrix.clang-runtime }}"
819
- SUPPRESSION_FILE="../etc/clang${CLANG_VERSION}-valgrind.supp"
820
- valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --suppressions="${SUPPRESSION_FILE}" --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -sv -ra
821
- fi
822
609
export RETCODE=+$?
823
610
echo ::endgroup::
824
611
0 commit comments