Skip to content

Commit 2f22c4f

Browse files
authored
Merge pull request #83 from olifre/install-targets-also-if-testing
Revert "only set install targets when not doing unit tests"
2 parents 37e8b02 + 0ff3588 commit 2f22c4f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/ccpp.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ jobs:
1616
build:
1717

1818
runs-on: ubuntu-latest
19-
19+
20+
strategy:
21+
matrix:
22+
external-gtest: [ YES, NO ]
23+
24+
name: Build with external_gtest=${{ matrix.external-gtest }}
25+
2026
steps:
2127
- uses: actions/checkout@v1
2228
with:
2329
submodules: recursive
2430
- name: install deps
2531
run: |
26-
sudo apt update && sudo apt-get install libssl-dev sqlite3 libsqlite3-dev cmake libcurl4 libcurl4-openssl-dev uuid-dev
32+
sudo apt update && sudo apt-get install libssl-dev sqlite3 libsqlite3-dev cmake libcurl4 libcurl4-openssl-dev uuid-dev libgtest-dev
2733
2834
- name: Create Build Environment
2935
# Some projects don't allow in-source building, so create a separate build directory
@@ -38,7 +44,7 @@ jobs:
3844
# Note the current convention is to use the -S and -B options here to specify source
3945
# and build directories, but this is only available with CMake 3.13 and higher.
4046
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
41-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UNITTESTS=yes
47+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_UNITTESTS=yes -DEXTERNAL_GTEST=${{ matrix.external-gtest }}
4248

4349
- name: Build
4450
working-directory: ${{runner.workspace}}/build
@@ -52,5 +58,3 @@ jobs:
5258
# Execute tests defined by the CMake configuration.
5359
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
5460
run: ctest -C $BUILD_TYPE --verbose
55-
56-

0 commit comments

Comments
 (0)