diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 3ee6d30b..c745d669 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -3,7 +3,7 @@ name: Documentation on: push: tags: - - '*' + - "*" jobs: build: @@ -12,14 +12,21 @@ jobs: steps: - uses: actions/checkout@v1 + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + - name: Install dependencies run: | brew install doxygen pip3 install jinja2 Pygments - name: Build + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules run: | - cmake -Hdocumentation -Bbuild + cmake -Sdocumentation -Bbuild cmake --build build --target GenerateDocs - name: Publish diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 997da70f..8dab9a59 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -13,25 +13,31 @@ env: jobs: build: - 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 - - - name: configure - run: cmake -Htest -Bbuild -DTEST_INSTALLED_VERSION=1 - - - name: build - run: cmake --build build --config Debug -j4 - - - name: test - run: | - cd build - ctest --build-config Debug + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: build and install library + run: | + cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release + sudo cmake --build build --target install + rm -rf build + + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Stest -Bbuild -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 2fcbe9cd..d2aa7ce7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,19 +13,25 @@ env: jobs: build: - runs-on: macos-latest - + steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Htest -Bbuild -DCMAKE_BUILD_TYPE=Debug - - - name: build - run: cmake --build build -j4 - - - name: test - run: | - cd build - ctest --build-config Debug + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=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 7fe2767e..6827eb48 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -10,17 +10,23 @@ on: jobs: build: - 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: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Sstandalone -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_TYPE=Debug - - name: build - run: cmake --build build -j4 + - name: build + run: cmake --build build -j4 - - name: run - run: ./build/Greeter + - name: run + run: ./build/Greeter diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 48d1fa5b..711900c9 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -10,19 +10,25 @@ on: jobs: build: - 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: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: Install format dependencies + run: | + brew install clang-format + pip3 install cmake_format==0.6.11 pyyaml - - name: configure - run: cmake -Htest -Bbuild + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Stest -Bbuild - - name: check style - run: cmake --build build --target check-format + - name: check style + run: cmake --build build --target check-format diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 29d15090..ca2c86d2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -14,22 +14,28 @@ env: jobs: build: - 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 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug - - name: build - run: cmake --build build -j4 + - name: build + run: cmake --build build -j4 - - name: test - run: | - cd build - ctest --build-config Debug + - 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" + - 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 8f6d2b2c..6d6e1b44 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -13,19 +13,25 @@ env: jobs: build: - runs-on: windows-latest - + steps: - - uses: actions/checkout@v1 - - - name: configure - run: cmake -Htest -Bbuild - - - name: build - run: cmake --build build --config Debug -j4 - - - name: test - run: | - cd build - ctest --build-config Debug + - uses: actions/checkout@v1 + + - uses: actions/cache@v2 + with: + path: "**/cpm_modules" + key: ${{ github.action }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + + - name: configure + env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + run: cmake -Stest -Bbuild + + - name: build + run: cmake --build build --config Debug -j4 + + - name: test + run: | + cd build + ctest --build-config Debug diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index bffba540..7e357412 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -1,4 +1,4 @@ -set(CPM_DOWNLOAD_VERSION 0.27.2) +set(CPM_DOWNLOAD_VERSION 0.28.0) if(CPM_SOURCE_CACHE) set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")