summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2021-07-04 22:07:06 -0700
committerRalph Giles <giles@thaumas.net>2021-07-11 13:53:07 -0700
commitbac77f73f2d3bc974c8d8c3e8a43a5bb81ef2f62 (patch)
tree6c6a90a56e92dfd73f5ac01b6af8f4a69b4c6431
parent21a217e737041a5b64eed830ab5431b226f68622 (diff)
downloadflac-bac77f73f2d3bc974c8d8c3e8a43a5bb81ef2f62.tar.gz
github actions: Split CMake build into separate steps.
Failures within multi-line commands aren't detected properly in the windows runner environment. Therefore split each line into a separate step for the cmake build. Use the `working-directory` key to mark the build subdir without having the prepend a `cd` command.
-rw-r--r--.github/workflows/action.yml33
1 files changed, 26 insertions, 7 deletions
diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml
index 275e117d..c7c8c3c5 100644
--- a/.github/workflows/action.yml
+++ b/.github/workflows/action.yml
@@ -144,17 +144,36 @@ jobs:
make
make check
- - name: Build with CMake
+ - name: Prepare CMake build directory
if: startsWith(matrix.build-system,'cmake')
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
- run: |
- mkdir cmake-build
- cd cmake-build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
- cmake --build .
- ctest -V
+ run: mkdir cmake-build
+
+ - name: CMake generator
+ if: startsWith(matrix.build-system,'cmake')
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+ working-directory: cmake-build
+ run: cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
+
+ - name: CMake build
+ if: startsWith(matrix.build-system,'cmake')
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+ working-directory: cmake-build
+ run: cmake --build .
+
+ - name: CMake test
+ if: startsWith(matrix.build-system,'cmake')
+ env:
+ CC: ${{ matrix.cc }}
+ CXX: ${{ matrix.cxx }}
+ working-directory: cmake-build
+ run: ctest -V
- name: Upload logs on failure
uses: actions/upload-artifact@v2