Skip to content

Commit 2ba4ca4

Browse files
committed
one more attempt at workflow
1 parent 222a096 commit 2ba4ca4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,24 @@ jobs:
5050
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
5151
if [ "$RUNNER_OS" = "Linux" ]; then
5252
echo "vcpkg-setup-file=bootstrap-vcpkg.sh" >> "$GITHUB_OUTPUT"
53-
echo "enable_coverage=ON" >> "$GITHUB_OUTPUT"
5453
elif [ "$RUNNER_OS" = "Windows" ]; then
5554
echo "vcpkg-setup-file=bootstrap-vcpkg.bat" >> "$GITHUB_OUTPUT"
56-
echo "enable_coverage=OFF" >> "$GITHUB_OUTPUT"
5755
fi
5856
57+
- name: Set coverage off
58+
if: matrix.c_compiler != 'gcc' || matrix.build_type == 'Release'
59+
id: coverage-state
60+
shell: bash
61+
run: |
62+
echo "enable_coverage=OFF" >> "$GITHUB_OUTPUT"
63+
64+
- name: Set coverage on
65+
if: matrix.c_compiler != 'gcc' && matrix.build_type == 'Release'
66+
id: coverage-state
67+
shell: bash
68+
run: |
69+
echo "enable_coverage=ON" >> "$GITHUB_OUTPUT"
70+
5971
- name: Install lcov Linux
6072
id: install-lcov
6173
if: matrix.os == 'ubuntu-latest'
@@ -87,7 +99,7 @@ jobs:
8799
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }}
88100
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
89101
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
90-
-DENABLE_COVERAGE=${{ steps.strings.outputs.enable_coverage }}
102+
-DENABLE_COVERAGE=${{ steps.coverage-state.outputs.enable_coverage }}
91103
-S ${{ github.workspace }}
92104
93105
- name: Build

0 commit comments

Comments
 (0)