Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add runner that builds MSVC target with clang/clang++ #760

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/root-cmakelists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ jobs:
cuda: [without]
link: [both]
cc: [cl]
cxx: [cl]
include:
- openmp: without
openmp-cmake-flags: "-DSUITESPARSE_USE_OPENMP=OFF"
Expand All @@ -315,6 +316,7 @@ jobs:
-DCMAKE_CUDA_COMPILER_LAUNCHER="ccache"
link: both
cc: cl
cxx: cl
- openmp: with
cuda: with
cuda-cmake-flags:
Expand All @@ -325,10 +327,17 @@ jobs:
-DBUILD_SHARED_LIBS=OFF
-DBUILD_STATIC_LIBS=ON
cc: cl
cxx: cl
- openmp: with
cuda: without
link: both
cc: clang-cl
cxx: clang-cl
- openmp: with
cuda: without
link: both
cc: clang
cxx: clang++

env:
CHERE_INVOKING: 1
Expand Down Expand Up @@ -459,15 +468,15 @@ jobs:
# Suppress erroneous version check.
_extra_config+=(-DCMAKE_CUDA_FLAGS=-allow-unsupported-compiler)
fi
if [ ${{ matrix.cc }} = 'clang-cl' ]; then
# Move away (old) clang-cl that would be in PATH to make sure that
# we use the one that matches the MSVC runtime.
if [[ ${{ matrix.cc }} == clang* ]]; then
# Move away (old) clang/clang++ and clang-cl that would be in PATH
# to make sure that we use the one that matches the MSVC runtime.
mv C:/Program\ Files/LLVM C:/Program\ Files/LLVM_old
fi
mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build
cmake -G"Ninja Multi-Config" \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=".." \
-DCMAKE_PREFIX_PATH="C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
Expand Down Expand Up @@ -532,7 +541,7 @@ jobs:
printf "::group::\033[0;32m==>\033[0m Configuring example\n"
cmake -G"Ninja Multi-Config" \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
-DBLA_VENDOR="All" \
${{ matrix.openmp-cmake-flags }} \
Expand Down Expand Up @@ -570,7 +579,7 @@ jobs:
cd build
cmake -G"Ninja Multi-Config" \
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/lib/cmake;C:/Miniconda/envs/test/Library;${GITHUB_WORKSPACE}/dependencies" \
..
cmake --build . --config Release
Expand Down