Skip to content

Commit d48c87a

Browse files
committed
Speed up running of Ubuntu ci jobs
1 parent 9fc91d7 commit d48c87a

File tree

1 file changed

+26
-33
lines changed

1 file changed

+26
-33
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -482,22 +482,19 @@ jobs:
482482
clang-runtime: '17'
483483
cling: Off
484484
cppyy: On
485-
coverage: true
486485
- name: ubu22-x86-gcc12-clang-repl-16-cppyy
487486
os: ubuntu-22.04
488487
compiler: gcc-12
489488
clang-runtime: '16'
490489
cling: Off
491490
cppyy: On
492-
coverage: true
493491
- name: ubu22-x86-gcc9-clang13-cling-cppyy
494492
os: ubuntu-22.04
495493
compiler: gcc-9
496494
clang-runtime: '13'
497495
cling: On
498496
cling-version: '1.0'
499497
cppyy: On
500-
coverage: true
501498
#FIXME: Windows CppInterOp tests expected to fail
502499
#until https://github.com/compiler-research/CppInterOp/issues/188 is solved
503500
- name: win2022-msvc-clang-repl-18
@@ -747,14 +744,10 @@ jobs:
747744
run: |
748745
# Install deps
749746
sudo apt-get update
750-
sudo apt-get install git g++ debhelper devscripts gnupg python3
751-
sudo apt-get install -y libc6-dbg
752-
sudo snap install valgrind --classic
753-
sudo apt autoremove
754-
sudo apt clean
755-
# Install libraries used by the cppyy test suite
756-
sudo apt install libeigen3-dev
757-
sudo apt install libboost-all-dev
747+
sudo apt-get install git g++ debhelper devscripts gnupg python3 valgrind
748+
conda install -y -q -c conda-forge \
749+
distro \
750+
pytest
758751
759752
- name: Install deps on MacOS
760753
if: runner.os == 'macOS'
@@ -915,6 +908,23 @@ jobs:
915908
cmake --build . --config ${{ env.BUILD_TYPE }} --target check-cppinterop --parallel ${{ env.ncpus }}
916909
cd ..
917910
911+
- name: Prepare code coverage report
912+
if: ${{ success() && (matrix.coverage == true) }}
913+
run: |
914+
# Create lcov report
915+
# capture coverage info
916+
vers="${CC#*-}"
917+
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
918+
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
919+
# output coverage data for debugging (optional)
920+
lcov --list coverage.info
921+
922+
- name: Upload to codecov.io
923+
if: ${{ success() && (matrix.coverage == true) }}
924+
uses: codecov/codecov-action@v4
925+
with:
926+
file: ./coverage.info
927+
918928
- name: Build and Install cppyy-backend on Unix Systems
919929
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
920930
run: |
@@ -1009,14 +1019,14 @@ jobs:
10091019
10101020
set -o pipefail
10111021
if [[ "${{ matrix.os }}" == macos-* ]]; then
1012-
echo "Skipping Valgrind checks on OS X"
1022+
echo "Skipping Valgrind checks on macOS"
10131023
else
1014-
if [[ "${{ matrix.clang-runtime }}" == "17" ]]; then
1015-
echo "Valgrind reports true for clang-runtime 17 due to problems with LLVM"
1016-
valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v || true
1024+
if [[ "${{ matrix.clang-runtime }}" == "17" || "${{ matrix.clang-runtime }}" == "18" ]]; then
1025+
echo "Valgrind reports true for clang-runtime 17 or 18, due to memory leaks with LLVM"
1026+
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v || true
10171027
else
10181028
echo "Running valgrind on passing tests"
1019-
valgrind --show-error-list=yes --error-exitcode=1 --track-origins=yes --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
1029+
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
10201030
fi
10211031
fi
10221032
export RETCODE=+$?
@@ -1039,23 +1049,6 @@ jobs:
10391049
export
10401050
echo $GITHUB_ENV
10411051
1042-
- name: Prepare code coverage report
1043-
if: ${{ success() && (matrix.coverage == true) }}
1044-
run: |
1045-
# Create lcov report
1046-
# capture coverage info
1047-
vers="${CC#*-}"
1048-
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
1049-
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
1050-
# output coverage data for debugging (optional)
1051-
lcov --list coverage.info
1052-
1053-
- name: Upload to codecov.io
1054-
if: ${{ success() && (matrix.coverage == true) }}
1055-
uses: codecov/codecov-action@v4
1056-
with:
1057-
file: ./coverage.info
1058-
10591052
- name: Setup tmate session
10601053
if: ${{ failure() && runner.debug }}
10611054
uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)