diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 4661a9c..8b12266 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -5,6 +5,9 @@ on: tags: - "*" +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + jobs: build: name: Build and publish documentation @@ -23,8 +26,6 @@ jobs: pip3 install jinja2 Pygments - name: Build - env: - CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules run: | cmake -Sdocumentation -Bbuild cmake --build build --target GenerateDocs diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index b34697a..606dddd 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -10,6 +10,7 @@ on: env: CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules jobs: build: @@ -25,13 +26,11 @@ jobs: - name: build and install library run: | - cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release + cmake -S. -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 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ae25472..a2a098f 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -10,6 +10,7 @@ on: env: CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules jobs: build: @@ -24,8 +25,6 @@ jobs: key: ${{ github.workflow }}-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 diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index 6afabb6..5c3853e 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -8,6 +8,9 @@ on: branches: - master +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + jobs: build: runs-on: ubuntu-latest @@ -21,8 +24,6 @@ jobs: key: ${{ github.workflow }}-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 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 25dd32f..ba20a70 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -8,6 +8,9 @@ on: branches: - master +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules + jobs: build: runs-on: macos-latest @@ -26,8 +29,6 @@ jobs: pip3 install cmake_format==0.6.11 pyyaml - name: configure - env: - CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules run: cmake -Stest -Bbuild - name: check style diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b98dd25..a36711d 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,6 +11,7 @@ on: env: CTEST_OUTPUT_ON_FAILURE: 1 CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules jobs: build: @@ -25,8 +26,6 @@ jobs: key: ${{ github.workflow }}-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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 734573e..a52b0ae 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -10,6 +10,7 @@ on: env: CTEST_OUTPUT_ON_FAILURE: 1 + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules jobs: build: @@ -24,8 +25,6 @@ jobs: key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - env: - CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules run: cmake -Stest -Bbuild - name: build