Skip to content

Commit

Permalink
Fixed Windows CI builds (#586)
Browse files Browse the repository at this point in the history
* Revert "Add gtest to Fetch content #550 (#551)"

This reverts commit 70d59ed - breaking the windows builds

* Fix CI for Windows builds

---------

Co-authored-by: Gonçalo Almeida <Goncalo.Almeida@ctw.bmwgroup.com>
  • Loading branch information
goncaloalmeida and Gonçalo Almeida committed Dec 11, 2023
1 parent 55376c1 commit 64f8d4e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
sudo apt-get update -qq
sudo apt-get install -y googletest asciidoc source-highlight doxygen graphviz
- name: Run CMake
run: |
cmake -Bbuild \
-DBOOST_ROOT=/home/runner/boost/boost/ -DGTEST_ROOT=/usr/src/googletest/googletest/ -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install .
cmake --build build -t all build_tests doc install
- name: Run CMake config
run: cmake -Bbuild -DBOOST_ROOT=/home/runner/boost/boost/ -DGTEST_ROOT=/usr/src/googletest/googletest/ -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install .

- name: Build CMake
run: cmake --build build -t all build_tests doc install

- uses: actions/upload-artifact@v2
with:
Expand All @@ -56,6 +56,7 @@ jobs:
- uses: actions/checkout@v3

- name: Run CMake
run: |
cmake -Bbuild -D BOOST_ROOT=C:\runner\boost/boost\ .
cmake --build build
run: cmake -Bbuild -D BOOST_ROOT=C:\runner\boost/boost\ .

- name: Build CMake
run: cmake --build build
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ if (NOT GTEST_ROOT)
if (DEFINED ENV{GTEST_ROOT})
set(GTEST_ROOT $ENV{GTEST_ROOT})
else()
include(FetchContent)
FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.14.0)
FetchContent_Populate(googletest)
set(GTEST_ROOT ${googletest_SOURCE_DIR})
set(GTEST_ROOT "n/a" CACHE STRING "Path to root folder of googletest. Must be set for building the tests.")
endif()
endif()

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ Optional:
- A C++14 enabled compiler is needed (default for gcc >= v6.1).
- vsomeip uses CMake as buildsystem.
- vsomeip uses Boost >= 1.55.0:
- Google's test framework (downloaded automaticaly)

For the tests Google's test framework https://code.google.com/p/googletest/[gtest] is needed.
-- URL: https://googletest.googlecode.com/files/gtest-<version>.zip

To build the documentation asciidoc, source-highlight, doxygen and graphviz is needed:
--`sudo apt-get install asciidoc source-highlight doxygen graphviz`
Expand Down

0 comments on commit 64f8d4e

Please sign in to comment.