Skip to content

Commit bccda1c

Browse files
authored
Attempt to fix llvm 19 ci (#94)
1 parent 9a73ba6 commit bccda1c

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
clang-runtime: '17'
4040
cling: Off
4141
cppyy: On
42-
- name: ubu22-x86-gcc9-clang-repl-16-cppyy
42+
- name: ubu22-x86-gcc12-clang-repl-16-cppyy
4343
os: ubuntu-22.04
44-
compiler: gcc-9
44+
compiler: gcc-12
4545
clang-runtime: '16'
4646
cling: Off
4747
cppyy: On
48-
- name: ubu22-x86-gcc9-clang13-cling-cppyy
48+
- name: ubu22-x86-gcc12-clang13-cling-cppyy
4949
os: ubuntu-22.04
50-
compiler: gcc-9
50+
compiler: gcc-12
5151
clang-runtime: '13'
5252
cling: On
5353
cling-version: '1.0'
@@ -227,13 +227,12 @@ jobs:
227227
if ! sudo apt install -y clang-${vers}; then
228228
curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
229229
echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-${vers} main" | sudo tee -a /etc/apt/sources.list
230-
sudo apt update
230+
sudo apt-get update
231231
sudo apt install -y clang-${vers}
232232
fi
233233
echo "CC=clang-${vers}" >> $GITHUB_ENV
234234
echo "CXX=clang++-${vers}" >> $GITHUB_ENV
235235
fi
236-
237236
env:
238237
compiler: ${{ matrix.compiler }}
239238

@@ -295,10 +294,8 @@ jobs:
295294
sudo apt-get install git g++ debhelper devscripts gnupg python3
296295
sudo apt-get install -y libc6-dbg
297296
sudo snap install valgrind --classic
298-
conda install -y -q -c conda-forge \
299-
distro \
300-
pytest
301-
297+
sudo apt autoremove
298+
sudo apt clean
302299
# Install libraries used by the cppyy test suite
303300
sudo apt install libeigen3-dev
304301
sudo apt install libboost-all-dev
@@ -357,43 +354,48 @@ jobs:
357354
cd llvm-project
358355
# Build
359356
mkdir build
360-
if [[ "${cling_on}" == "ON" ]]; then
357+
if [[ "${cling_on}" == "ON" ]]; then
361358
cd build
362-
cmake -DLLVM_ENABLE_PROJECTS=clang \
363-
-DLLVM_EXTERNAL_PROJECTS=cling \
364-
-DLLVM_EXTERNAL_CLING_SOURCE_DIR=../../cling \
365-
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
366-
-DCMAKE_BUILD_TYPE=Release \
367-
-DLLVM_ENABLE_ASSERTIONS=ON \
368-
-DLLVM_ENABLE_LLD=ON \
369-
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
370-
-DCLANG_ENABLE_ARCMT=OFF \
371-
-DCLANG_ENABLE_FORMAT=OFF \
372-
-DCLANG_ENABLE_BOOTSTRAP=OFF \
359+
cmake -DLLVM_ENABLE_PROJECTS="clang;lld" \
360+
-DLLVM_EXTERNAL_PROJECTS=cling \
361+
-DLLVM_EXTERNAL_CLING_SOURCE_DIR=../../cling \
362+
-DLLVM_TARGETS_TO_BUILD="WebAssembly;host;NVPTX" \
363+
-DCMAKE_BUILD_TYPE=Release \
364+
-DLLVM_ENABLE_ASSERTIONS=ON \
365+
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
366+
-DCLANG_ENABLE_ARCMT=OFF \
367+
-DCLANG_ENABLE_FORMAT=OFF \
368+
-DCLANG_ENABLE_BOOTSTRAP=OFF \
369+
-DLLVM_ENABLE_ZSTD=OFF \
370+
-DLLVM_ENABLE_TERMINFO=OFF \
371+
-DLLVM_ENABLE_LIBXML2=OFF \
373372
../llvm
373+
cmake --build . --target lld --parallel ${{ env.ncpus }}
374374
cmake --build . --target clang --parallel ${{ env.ncpus }}
375375
cmake --build . --target cling --parallel ${{ env.ncpus }}
376376
# Now build gtest.a and gtest_main for CppInterOp to run its tests.
377377
cmake --build . --target gtest_main --parallel ${{ env.ncpus }}
378378
else
379379
# Apply patches
380380
llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]')
381-
if [[ "${llvm_vers}" == "16" ]]||[[ "${llvm_vers}" == "17" ]]; then
381+
if [[ "${llvm_vers}" == "16" ]]||[[ "${llvm_vers}" == "17" ]]; then
382382
git apply -v ../cppyy/patches/llvm/clang${{ matrix.clang-runtime }}-*.patch
383383
echo "Apply clang${{ matrix.clang-runtime }}-*.patch patches:"
384384
fi
385385
cd build
386-
cmake -DLLVM_ENABLE_PROJECTS=clang \
387-
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
388-
-DCMAKE_BUILD_TYPE=Release \
389-
-DLLVM_ENABLE_ASSERTIONS=ON \
390-
-DLLVM_ENABLE_LLD=ON \
391-
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
392-
-DCLANG_ENABLE_ARCMT=OFF \
393-
-DCLANG_ENABLE_FORMAT=OFF \
394-
-DCLANG_ENABLE_BOOTSTRAP=OFF \
386+
cmake -DLLVM_ENABLE_PROJECTS="clang;lld" \
387+
-DLLVM_TARGETS_TO_BUILD="WebAssembly;host;NVPTX" \
388+
-DCMAKE_BUILD_TYPE=Release \
389+
-DLLVM_ENABLE_ASSERTIONS=ON \
390+
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
391+
-DCLANG_ENABLE_ARCMT=OFF \
392+
-DCLANG_ENABLE_FORMAT=OFF \
393+
-DCLANG_ENABLE_BOOTSTRAP=OFF \
394+
-DLLVM_ENABLE_ZSTD=OFF \
395+
-DLLVM_ENABLE_TERMINFO=OFF \
396+
-DLLVM_ENABLE_LIBXML2=OFF \
395397
../llvm
396-
cmake --build . --target clang clang-repl --parallel ${{ env.ncpus }}
398+
cmake --build . --target clang clang-repl lld --parallel ${{ env.ncpus }}
397399
fi
398400
cd ../
399401
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
@@ -533,17 +535,17 @@ jobs:
533535
-DClang_DIR=$LLVM_BUILD_DIR/lib/cmake/clang \
534536
-DBUILD_SHARED_LIBS=ON \
535537
-DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR \
536-
-DCPPINTEROP_ENABLE_TESTING=OFF \
537538
../
538539
else
539540
cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
540541
-DUSE_CLING=OFF \
541542
-DUSE_REPL=ON \
542-
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \
543-
-DClang_DIR=$LLVM_BUILD_DIR/lib/cmake/clang \
543+
-DLLVM_DIR=$LLVM_BUILD_DIR/lib/cmake/llvm \
544+
-DClang_DIR=$LLVM_BUILD_DIR/lib/cmake/clang \
544545
-DBUILD_SHARED_LIBS=ON \
546+
-DCODE_COVERAGE=${{ env.CODE_COVERAGE }} \
545547
-DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR \
546-
-DCPPINTEROP_ENABLE_TESTING=OFF \
548+
-DLLVM_ENABLE_WERROR=On \
547549
../
548550
fi
549551
os="${{ matrix.os }}"
@@ -725,7 +727,6 @@ jobs:
725727
726728
# Run the rest of the non-crashing tests.
727729
declare -i RETCODE=0
728-
729730
set -o pipefail
730731
if [[ "${{ matrix.os }}" == macos-* ]]; then
731732
echo "Skipping Valgrind checks on OS X"
@@ -737,9 +738,7 @@ jobs:
737738
fi
738739
export RETCODE=+$?
739740
echo ::endgroup::
740-
741741
RETCODE=+$?
742-
743742
echo "Complete Test Suite Summary: \n"
744743
tail -n1 complete_testrun.log
745744
echo "Crashing Summary: \n"
@@ -748,7 +747,7 @@ jobs:
748747
tail -n1 test_xfailed.log
749748
echo "Return Code: ${RETCODE}"
750749
exit $RETCODE
751-
750+
752751
- name: Show debug info
753752
if: ${{ failure() && (runner.os != 'windows') }}
754753
run: |

0 commit comments

Comments
 (0)