Skip to content

Commit

Permalink
[test] test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Oct 19, 2023
1 parent b27c6ec commit e6598e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build-and-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install Google Test (Linux)
if: matrix.os == 'ubuntu-latest'
run: >
sudo apt-get install libgtest-dev
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
working-directory: ${{ github.workspace }}
run: |
cmake . -B ./build -G 'Unix Makefiles' \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_DOWNLOAD_GTEST=ON
- name: Build (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -58,4 +53,4 @@ jobs:
- name: Test
working-directory: ${{ github.workspace }}/build
run: |
make && ./bin/utest
make VERBOSE=1 && ./bin/utest
6 changes: 3 additions & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

if ("${CMAKE_DOWNLOAD_GTEST}")
include(fetchcontent)
include(FetchContent)
fetchcontent_declare(
googletest
GTest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # tagged v1.14.0
)
fetchcontent_makeavailable(googletest)
fetchcontent_makeavailable(GTest)
endif()
find_package(GTest REQUIRED)

Expand Down

0 comments on commit e6598e3

Please sign in to comment.