Skip to content

Commit

Permalink
Use an environment variable for the CMake build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Dec 12, 2024
1 parent 4f2ab4a commit e7f547b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

env:
BMI_VERSION: 2_0
BUILD_DIR: _build

jobs:
build-test-unix:
Expand Down Expand Up @@ -39,10 +40,10 @@ jobs:
- name: Configure project
run: |
cmake -B _build -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release
cmake -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release
- name: Build and install
run: cmake --build _build --target install --config Release
run: cmake --build ${{ env.BUILD_DIR }} --target install --config Release

- name: Test
run: |
Expand Down Expand Up @@ -81,8 +82,8 @@ jobs:
- name: Configure, build, and install project
run: |
cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX="${{ env.LIBRARY_PREFIX }}" -DCMAKE_BUILD_TYPE=Release
cmake --build _build --target install --config Release
cmake -B ${{ env.BUILD_DIR }} -G Ninja -DCMAKE_INSTALL_PREFIX="${{ env.LIBRARY_PREFIX }}" -DCMAKE_BUILD_TYPE=Release
cmake --build ${{ env.BUILD_DIR }} --target install --config Release
- name: Check (for humans)
run: |
Expand Down

0 comments on commit e7f547b

Please sign in to comment.