Skip to content

Commit 6b367ab

Browse files
committed
Merge branch 'feature/github-actions' into develop
2 parents bd5586a + 703e7e4 commit 6b367ab

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/cmake.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v3
2323

24+
- name: Set variables
25+
run: |
26+
echo "BUILD_TYPE_LOWERCASE=$(echo ${BUILD_TYPE} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
27+
2428
- name: Install dependencies
2529
run: |
2630
sudo apt-get update
@@ -38,12 +42,12 @@ jobs:
3842
run: ./vcpkg install gsl:x64-linux gtest:x64-linux benchmark:x64-linux fmt:x64-linux
3943

4044
- name: Configure CMake
41-
run: cmake --preset linux-release -S ${{github.workspace}}/cpp-algorithm -B ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-release
45+
run: cmake --preset linux-${{env.BUILD_TYPE_LOWERCASE}} -S ${{github.workspace}}/cpp-algorithm -B ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
4246

4347
- name: Build
44-
working-directory: ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-release
48+
working-directory: ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
4549
run: cmake --build . --config ${{env.BUILD_TYPE}} --target all --parallel 6
4650

4751
- name: Test
48-
working-directory: ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-release
52+
working-directory: ${{github.workspace}}/cpp-algorithm/out/build/linux-x64-${{env.BUILD_TYPE_LOWERCASE}}
4953
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure

0 commit comments

Comments
 (0)