From 365d09f108ce44b76e2d4278b6821c0abe8bf1a5 Mon Sep 17 00:00:00 2001 From: Rick Vogel Date: Mon, 31 Oct 2022 11:27:49 +0100 Subject: [PATCH] remove ambigous step --- .github/workflows/cmake.yml | 61 +++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 61674eb1..e0a5a9a5 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -24,7 +24,12 @@ jobs: environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", archiver: "7z a", generators: "Visual Studio 17 2022", - qtcmakedir: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5", # TODO find better solution + cmake: + { + qtversion: "5.15.2", + qtdirkey: "Qt5_DIR", + qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5", + }, } - { name: "Windows 2019 MSVC Qt5", @@ -36,7 +41,12 @@ jobs: environment_script: "C:/Program Files/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", archiver: "7z a", generators: "Visual Studio 16 2019", - qtcmakedir: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5", # TODO find better solution + cmake: + { + qtversion: "5.15.2", + qtdirkey: "Qt5_DIR", + qtdirvalue: "../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5", + }, } - { name: "Ubuntu_Latest_GCC Qt5", @@ -47,7 +57,12 @@ jobs: cxx: "g++", archiver: "7z a", generators: "Ninja", - qtcmakedir: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5", # TODO find better solution + cmake: + { + qtversion: "5.15.2", + qtdirkey: "Qt5_DIR", + qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5", + }, } - { name: "Ubuntu_GCC_9 Qt5", @@ -58,7 +73,12 @@ jobs: cxx: "g++", archiver: "7z a", generators: "Ninja", - qtcmakedir: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5", # TODO find better solution + cmake: + { + qtversion: "5.15.2", + qtdirkey: "Qt5_DIR", + qtdirvalue: "../Qt/5.15.2/gcc_64/lib/cmake/Qt5", + }, } - { name: "macOS Latest Clang Qt5", @@ -69,7 +89,12 @@ jobs: cxx: "clang++", archiver: "7za a", generators: "Ninja", - qtcmakedir: "../Qt/5.15.2/clang_64/lib/cmake/Qt5", # TODO find better solution + cmake: + { + qtversion: "5.15.2", + qtdirkey: "Qt5_DIR", + qtdirvalue: "../Qt/5.15.2/clang_64/lib/cmake/Qt5", + }, } steps: @@ -140,30 +165,6 @@ jobs: - uses: actions/checkout@v2 - - name: Version Delegate Qt5 MSVC - if: "endsWith(matrix.config.name, 'Qt5') && contains(matrix.config.name, 'MSVC')" - id: version-delegate - run: | - echo "Qt_VERSION=5.15.2" >> $GITHUB_OUTPUT - echo "Qt_DIR_KEY=Qt5_DIR" >> $GITHUB_OUTPUT - echo "Qt_DIR_VALUE=../Qt/5.15.2/msvc2019_64/lib/cmake/Qt5" >> $GITHUB_OUTPUT - - - name: Version Delegate Qt5 GCC - if: "endsWith(matrix.config.name, 'Qt5') && contains(matrix.config.name, 'GCC')" - id: version-delegate - run: | - echo "Qt_VERSION=5.15.2" >> $GITHUB_OUTPUT - echo "Qt_DIR_KEY=Qt5_DIR" >> $GITHUB_OUTPUT - echo "Qt_DIR_VALUE=../Qt/5.15.2/gcc_64/lib/cmake/Qt5" >> $GITHUB_OUTPUT - - - name: Version Delegate Qt5 Clang - if: "endsWith(matrix.config.name, 'Qt5') && contains(matrix.config.name, 'Clang')" - id: version-delegate - run: | - echo "Qt_VERSION=5.15.2" >> $GITHUB_OUTPUT - echo "Qt_DIR_KEY=Qt5_DIR" >> $GITHUB_OUTPUT - echo "Qt_DIR_VALUE=../Qt/5.15.2/gcc_64/lib/cmake/Qt5" >> $GITHUB_OUTPUT - - name: Cache Qt id: cache-qt-5-15 uses: actions/cache@v1 # not v2! @@ -195,7 +196,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \ -G "${{ matrix.config.generators }}" \ -DCMAKE_INSTALL_PREFIX:PATH=instdir \ - -D${{ steps.version-delegate.outputs.Qt_DIR_KEY }}:PATH="${{ steps.version-delegate.outputs.Qt_DIR_VALUE }}" + -D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" - name: Build shell: bash run: cmake --build . --config ${{ matrix.config.build_type }}