Skip to content

Commit

Permalink
CI(test-clang): use conditionally defined flag for the build system
Browse files Browse the repository at this point in the history
  • Loading branch information
Puerling committed Sep 12, 2024
1 parent 597d419 commit c4ab1e4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ jobs:

env:
BUILD_TYPE: Release
BUILD_SYSTEM_FLAG: ${{ matrix.os == 'windows-2022' && '-G Ninja' || '' }}
CMAKE_FLAGS: >
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
Expand Down Expand Up @@ -205,13 +206,6 @@ jobs:
choco install llvm ninja -y
choco upgrade llvm
if ($env:CMAKE_FLAGS) {
$env:CMAKE_FLAGS = "${env:CMAKE_FLAGS} -G Ninja"
} else {
$env:CMAKE_FLAGS = "-G Ninja"
}
"CMAKE_FLAGS=\"${env:CMAKE_FLAGS}\"" | Out-File -FilePath $env:GITHUB_ENV -Append
- uses: actions/setup-python@v4
with:
python-version: '3.x'
Expand All @@ -226,7 +220,11 @@ jobs:
if: matrix.parallelisation == ''
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS
run: >
cmake $GITHUB_WORKSPACE
$BUILD_SYSTEM_FLAG
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
$CMAKE_FLAGS
- name: ⚙ Configure with CUDA
if: matrix.parallelisation == 'cuda'
Expand All @@ -245,7 +243,11 @@ jobs:
if: matrix.parallelisation == 'openmp'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS -DSPIRIT_USE_OPENMP=ON
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
$CMAKE_FLAGS
-DSPIRIT_USE_OPENMP=ON
- name: 🛠 Build
shell: bash
Expand Down

0 comments on commit c4ab1e4

Please sign in to comment.