Skip to content

Commit

Permalink
Use presets for CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 committed Jul 28, 2023
1 parent 26f697f commit 198c086
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.3

- name: configure
run: |
mkdir cmake-build
cmake -B cmake-build -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache .
run: cmake --preset ci-release-checks -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .

- name: build
run: cmake --build ./cmake-build
run: cmake --build ../mrtrix3-build-ci-release-checks

- name: unit tests
run: ctest -R unit --output-on-failure --test-dir ./cmake-build
run: ctest -R unit --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

- name: binary tests
run: ctest -R bin --output-on-failure --test-dir ./cmake-build
run: ctest -R bin --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

linux-gcc-build:

Expand All @@ -62,18 +60,16 @@ jobs:
uses: mozilla-actions/sccache-action@v0.0.3

- name: configure
run: |
mkdir cmake-build
cmake -B cmake-build -G Ninja -D CMAKE_CXX_COMPILER_LAUNCHER=sccache .
run: cmake --preset ci-release-checks

- name: build
run: cmake --build ./cmake-build
run: cmake --build ../mrtrix3-build-ci-release-checks

- name: unit tests
run: ctest -R unit --output-on-failure --test-dir ./cmake-build
run: ctest -R unit --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

- name: binary tests
run: ctest -R bin --output-on-failure --test-dir ./cmake-build
run: ctest -R bin --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

macos-build:

Expand Down Expand Up @@ -101,17 +97,16 @@ jobs:
- name: configure
run: |
export PATH=/usr/local/opt/qt5/bin:$PATH
mkdir cmake-build
cmake -B cmake-build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache .
cmake --preset ci-release-checks
- name: build
run: cmake --build ./cmake-build
run: cmake --build ../mrtrix3-build-ci-release-checks

- name: unit tests
run: ctest -R unit --output-on-failure --test-dir ./cmake-build
run: ctest -R unit --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

- name: binary tests
run: ctest -R bin --output-on-failure --test-dir ./cmake-build
run: ctest -R bin --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

windows-build:

Expand Down Expand Up @@ -162,16 +157,14 @@ jobs:
echo "SCCACHE_UNIX_PATH=$SCCACHE_UNIX_PATH" >> $GITHUB_ENV
- name: configure
run: |
mkdir cmake-build
cmake -B cmake-build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=${{env.SCCACHE_UNIX_PATH}} .
run: cmake --preset ci-release-checks -DCMAKE_CXX_COMPILER_LAUNCHER=${{env.SCCACHE_UNIX_PATH}} .

- name: build
run: cmake --build cmake-build
run: cmake --build ../mrtrix3-build-ci-release-checks

- name: unit tests
run: ctest -R unit --output-on-failure --test-dir ./cmake-build
run: ctest -R unit --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

- name: binary tests
run: ctest -R bin --output-on-failure --test-dir ./cmake-build
run: ctest -R bin --output-on-failure --test-dir ../mrtrix3-build-ci-release-checks

0 comments on commit 198c086

Please sign in to comment.