From 9733007236bdf72027999076d3273841ac17b4ad Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Wed, 20 Jan 2021 18:25:29 +0100 Subject: [PATCH] use env for all workflows --- .github/workflows/documentation.yaml | 2 +- .github/workflows/install.yml | 4 +++- .github/workflows/macos.yml | 4 +++- .github/workflows/standalone.yml | 2 ++ .github/workflows/style.yml | 4 +++- .github/workflows/ubuntu.yml | 4 +++- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 767bbce..cdceadb 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -24,7 +24,7 @@ jobs: - name: Build run: | - cmake -Sdocumentation -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules + cmake -Sdocumentation -Bbuild cmake --build build --target GenerateDocs - name: Publish diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index bc9a3ad..d0476ea 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -31,7 +31,9 @@ jobs: rm -rf build - name: configure - run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DTEST_INSTALLED_VERSION=1 + env: + CPM_SOURCE_CACHE: ${{ env.GITHUB_WORKSPACE }}/cpm_modules + run: cmake -Stest -Bbuild -DTEST_INSTALLED_VERSION=1 - name: build run: cmake --build build --config Debug -j4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bc2295a..2cec6d0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,7 +25,9 @@ jobs: key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DCMAKE_BUILD_TYPE=Debug + env: + CPM_SOURCE_CACHE: ${{ env.GITHUB_WORKSPACE }}/cpm_modules + run: cmake -Stest -Bbuild -DCMAKE_BUILD_TYPE=Debug - name: build run: cmake --build build -j4 diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index 5b2aba3..a9733e1 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -22,6 +22,8 @@ jobs: key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure + env: + CPM_SOURCE_CACHE: ${{ env.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 03b13f2..bed4d23 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -27,7 +27,9 @@ jobs: pip3 install cmake_format==0.6.11 pyyaml - name: configure - run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules + env: + CPM_SOURCE_CACHE: ${{ env.GITHUB_WORKSPACE }}/cpm_modules + run: cmake -Stest -Bbuild - name: check style run: cmake --build build --target check-format diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 11c3d12..bc46a2f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -26,7 +26,9 @@ jobs: key: cpm-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} - name: configure - run: cmake -Stest -Bbuild -DCPM_SOURCE_CACHE=$(pwd)/cpm_modules -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug + env: + CPM_SOURCE_CACHE: ${{ env.GITHUB_WORKSPACE }}/cpm_modules + run: cmake -Stest -Bbuild -DENABLE_TEST_COVERAGE=1 -DCMAKE_BUILD_TYPE=Debug - name: build run: cmake --build build -j4