Skip to content

Commit

Permalink
add cmake flag to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuan8 committed Sep 10, 2024
1 parent 06c327e commit 8a948bf
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,27 @@ jobs:
python -m pip install build pytest
shell: bash

- name: Build DLL
- name: Install CMake (if needed)
if: runner.os == 'macOS' || runner.os == 'Windows'
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' || exit 1
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install cmake
fi
shell: bash

- name: Build DLL (Windows)
if: runner.os == 'Windows'
run: |
set CMAKE_ARGS="-DCMAKE_CXX_FLAGS=/openmp"
python -m pip install -e .
shell: bash

- name: Build (macOS)
if: runner.os == 'macOS'
run: |
CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-fopenmp"
python -m pip install -e .
shell: bash

Expand Down

0 comments on commit 8a948bf

Please sign in to comment.