From 30d0dbfff848fc3f6450c3f9c48a01ebdcb72d38 Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Fri, 6 Jan 2023 22:40:08 +0000 Subject: [PATCH 1/2] Run on does not have access to environment. Use matrix for common OS setting --- .github/workflows/codeql-analysis.yml | 3 +-- .github/workflows/documentation.yml | 38 ++++++++++++++------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0a8c8b98..a40acad1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -25,11 +25,10 @@ on: jobs: analyze: name: Analyze - runs-on: ${{ OS }} + runs-on: ${{ matrix.os }} env: CC: gcc-10 CXX: g++-10 - OS: ubuntu-22.04 BUILD_TYPE: Debug COMPILER_TYPE: GCC COMPILER_VERSION: 10 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 94ecc93d..b9871027 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -35,21 +35,24 @@ on: - "docs/**" - "src/**" - "example/**" - -env: - CC: gcc-10 - CXX: g++-10 - CMAKE_GENERATOR: Ninja - CONAN_CMAKE_GENERATOR: Ninja - OS: ubuntu-22.04 - BUILD_TYPE: Debug - COMPILER_TYPE: GCC - COMPILER_VERSION: 10 - STDLIB: libstdc++11 + jobs: docs: name: Generate documentation - runs-on: ${{ OS }} + runs-on: ${{ matrix.os }} + env: + CC: gcc-10 + CXX: g++-10 + CMAKE_GENERATOR: Ninja + CONAN_CMAKE_GENERATOR: Ninja + BUILD_TYPE: Debug + COMPILER_TYPE: GCC + COMPILER_VERSION: 10 + STDLIB: libstdc++11 + strategy: + fail-fast: false + matrix: + os: [ "ubuntu-latest" ] steps: - uses: actions/checkout@v3 - name: Cache Conan data @@ -58,13 +61,12 @@ jobs: cache-name: cache-conan-data with: path: ~/.conan/data - key: build-${{ OS }}-${{ BUILD_TYPE }}-${{ COMPILER_TYPE }}-${{ COMPILER_VERSION }}-${{ STDLIB }} + key: build-${{ matrix.os }}-$BUILD_TYPE-$COMPILER_TYPE-$COMPILER_VERSION-$STDLIB restore-keys: | - build-${{ OS }}-${{ BUILD_TYPE }}-${{ COMPILER_TYPE }}-${{ COMPILER_VERSION }}-${{ STDLIB }} - build-${{ OS }}-${{ BUILD_TYPE }}-${{ COMPILER_TYPE }}-${{ COMPILER_VERSION }}- - build-${{ OS }}-${{ BUILD_TYPE }}-${{ COMPILER_TYPE }}- - build-${{ OS }}-${{ BUILD_TYPE }}- - build-${{ OS }}- + build-${{ matrix.os }}-$BUILD_TYPE-$COMPILER_TYPE-$COMPILER_VERSION- + build-${{ matrix.os }}-$BUILD_TYPE-$COMPILER_TYPE- + build-${{ matrix.os }}-$BUILD_TYPE- + build-${{ matrix.os }}- - name: Install Ninja run: | sudo apt install -y ninja-build From 6fbbdb0e4798d593df64c152a331699eee73fa6e Mon Sep 17 00:00:00 2001 From: Antony Peacock Date: Fri, 6 Jan 2023 22:45:19 +0000 Subject: [PATCH 2/2] Remove trailing white space --- .github/workflows/documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b9871027..34bdcb4e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -35,7 +35,6 @@ on: - "docs/**" - "src/**" - "example/**" - jobs: docs: name: Generate documentation @@ -45,6 +44,7 @@ jobs: CXX: g++-10 CMAKE_GENERATOR: Ninja CONAN_CMAKE_GENERATOR: Ninja + OS: ubuntu-22.04 BUILD_TYPE: Debug COMPILER_TYPE: GCC COMPILER_VERSION: 10