Skip to content

Commit e7f547b

Browse files
committed
Use an environment variable for the CMake build directory
1 parent 4f2ab4a commit e7f547b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
env:
66
BMI_VERSION: 2_0
7+
BUILD_DIR: _build
78

89
jobs:
910
build-test-unix:
@@ -39,10 +40,10 @@ jobs:
3940
4041
- name: Configure project
4142
run: |
42-
cmake -B _build -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release
43+
cmake -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release
4344
4445
- name: Build and install
45-
run: cmake --build _build --target install --config Release
46+
run: cmake --build ${{ env.BUILD_DIR }} --target install --config Release
4647

4748
- name: Test
4849
run: |
@@ -81,8 +82,8 @@ jobs:
8182
8283
- name: Configure, build, and install project
8384
run: |
84-
cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX="${{ env.LIBRARY_PREFIX }}" -DCMAKE_BUILD_TYPE=Release
85-
cmake --build _build --target install --config Release
85+
cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_INSTALL_PREFIX="${{ env.LIBRARY_PREFIX }}" -DCMAKE_BUILD_TYPE=Release
86+
cmake --build ${{ env.BUILD_DIR }} --target install --config Release
8687
8788
- name: Check (for humans)
8889
run: |

0 commit comments

Comments
 (0)