From df24c73348dd836eacc8b36e3f17e80a603ffe78 Mon Sep 17 00:00:00 2001 From: Snorlax Date: Thu, 28 Mar 2024 16:07:34 -0400 Subject: [PATCH] Update TestSuite.yml - Cache built TestSuite to run tests much quicker --- .github/workflows/TestSuite.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/TestSuite.yml b/.github/workflows/TestSuite.yml index 8362abe..7ed8540 100644 --- a/.github/workflows/TestSuite.yml +++ b/.github/workflows/TestSuite.yml @@ -16,11 +16,19 @@ jobs: - name: Install Submodules run: git submodule update --init --recursive - - name: Make tests + - name: Cache TestSuite + id: cache-test-suite + uses: actions/cache@v3 + with: + path: ./build/fiu-tests + key: ${{ runner.os }}-build-test-suite-${{ hashFiles('./tests/**/*.cpp') }}-${{ hashFiles('./tests/**/*.h') }} + + - if: ${{ steps.cache-test-suite.outputs.cache-hit != 'true' }} + name: Make tests run: | - cmake -DCMAKE_BUILD_TYPE=Release ./tests - cmake --build . --target=fiu-tests + cmake -DCMAKE_BUILD_TYPE=Release -B ./build ./tests + cmake --build ./build --target=fiu-tests --config Release - name: Run tests run: | - ./fiu-tests -O2 -D2 + ./build/fiu-tests -O2 -D2