diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 24c7684..ac8aadd 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -37,9 +37,47 @@ jobs: # id: strings shell: bash - run: | + run: > echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + - 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' + run: | + mkdir gtest + git clone https://github.com/google/googletest.git benchmark + mkdir googletest/build + cd googletest/build + cmake .. + make install + + - 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 }} + + - name: Install Google Benchmark + if: steps.cache-google-benchmark.outputs.cache-hit != 'true' + run: | + mkdir benchmark + git clone https://github.com/google/benchmark.git benchmark + mkdir benchmark/build + cd benchmark/build + cmake .. + make install + - name: Configure CMake # Configure CMake in a 'build' subdirectory. # `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.