Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Quuxplusone committed Oct 18, 2023
1 parent 3912df0 commit c51236e
Showing 1 changed file with 8 additions and 35 deletions.
43 changes: 8 additions & 35 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,27 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cache Google Test
id: cache-google-test
uses: actions/cache@v2
env:
cache-name: cache-google-test-repo
with:
path: googletest
key: ${{ matrix.os }}-build-${{ env.cache-name }}

- name: Install Google Test
if: steps.cache-google-test.outputs.cache-hit != 'true'
- name: Install Google Test (Linux)
if: matrix.os != 'windows-latest'
run: |
git clone https://github.com/google/googletest.git
mkdir googletest/build
cd googletest/build
cmake ..
make
- name: Cache Google Benchmark
id: cache-google-benchmark
uses: actions/cache@v2
env:
cache-name: cache-google-benchmark-repo
with:
path: benchmark
key: ${{ matrix.os }}-build-${{ env.cache-name }}
sudo apt-get install gtest-dev
- name: Install Google Benchmark
if: steps.cache-google-benchmark.outputs.cache-hit != 'true'
- name: Install Google Test (Windows)
if: matrix.os == 'windows-latest'
run: |
git clone https://github.com/google/benchmark.git
mkdir benchmark/build
cd benchmark/build
cmake .. -DBENCHMARK_ENABLE_TESTING=OFF
make
sudo choco install gtest-dev
# Configure CMake in a 'build' subdirectory.
# `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# -DCMAKE_PREFIX_PATH="${{ github.workspace }}/benchmark/build;${{ github.workspace }}/googletest/build" \
#
- name: Configure CMake
run: |
cmake -S ${{ github.workspace }} -B ${{ github.workspace }}/build \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DGTEST_ROOT=${{ github.workspace }}/googletest
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cd ${{ github.workspace }}/build
make
./bin/utest

0 comments on commit c51236e

Please sign in to comment.