diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 3ee6d30..767bbce 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -12,6 +12,11 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + - name: Install dependencies run: | brew install doxygen @@ -19,7 +24,7 @@ jobs: - name: Build run: | - cmake -Hdocumentation -Bbuild + cmake -Sdocumentation -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules cmake --build build --target GenerateDocs - name: Publish diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 997da70..bc9a3ad 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -17,21 +17,26 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: build and install library - run: | - cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release - sudo cmake --build build --target install - rm -rf build + - uses: actions/checkout@v1 - - name: configure - run: cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1 + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: build - run: cmake --build build --config Debug -j4 + - name: build and install library + run: | + cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release + sudo cmake --build build --target install + rm -rf build - - name: test - run: | - cd build - ctest --build-config Debug + - name: configure + run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DTEST_INSTALLED_VERSION=1 + + - name: build + run: cmake --build build --config Debug -j4 + + - name: test + run: | + cd build + ctest --build-config Debug diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2fcbe9c..bc2295a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,19 +13,24 @@ env: jobs: build: - + runs-on: macos-latest steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: build - run: cmake --build build -j4 + - name: configure + run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DCMAKE_BUILD_TYPE=Debug - - name: test - run: | - cd build - ctest --build-config Debug + - name: build + run: cmake --build build -j4 + + - name: test + run: | + cd build + ctest --build-config Debug diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index 7fe2767..5b2aba3 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -14,13 +14,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Hstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: build - run: cmake --build build -j4 + - name: configure + run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug - - name: run - run: ./build/Greeter + - name: build + run: cmake --build build -j4 + + - name: run + run: ./build/Greeter diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 48d1fa5..03b13f2 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -14,15 +14,20 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v1 - - - name: Install format dependencies - run: | - brew install clang-format - pip3 install cmake_format==0.6.11 pyyaml + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: configure - run: cmake -Htest -Bbuild + - name: Install format dependencies + run: | + brew install clang-format + pip3 install cmake_format==0.6.11 pyyaml - - name: check style - run: cmake --build build --target check-format + - name: configure + run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules + + - name: check style + run: cmake --build build --target check-format diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 29d1509..11c3d12 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -18,18 +18,23 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Htest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug + - uses: actions/checkout@v1 - - name: build - run: cmake --build build -j4 + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: test - run: | - cd build - ctest --build-config Debug + - name: configure + run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug - - name: collect code coverage - run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" + - name: build + run: cmake --build build -j4 + + - name: test + run: | + cd build + ctest --build-config Debug + + - name: collect code coverage + run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8f6d2b2..c5eb662 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -17,15 +17,20 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Htest -Bbuild + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: '**/cpm_modules' + key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - - name: build - run: cmake --build build --config Debug -j4 + - name: configure + run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules - - name: test - run: | - cd build - ctest --build-config Debug + - name: build + run: cmake --build build --config Debug -j4 + + - name: test + run: | + cd build + ctest --build-config Debug