From a87cbd9fa58798895989af48298b42b2346b85a8 Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Sun, 13 Oct 2024 23:31:09 +1100 Subject: [PATCH] Formalise the building of the path variable --- .github/workflows/build.yaml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f3293b73b..f97134a9b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -485,22 +485,32 @@ jobs: - { toolchain: 'mingw', arch: x86-64, qt: '6.7.3', aqtTools: 'tools_mingw1310' } - { toolchain: 'mingw', arch: x86-64, qt: '6.8.0', aqtTools: 'tools_mingw1310' } steps: - - if: matrix.toolchain != 'msvc' - shell: bash - run: | - tee -a "$GITHUB_PATH" <<< 'C:\msys64\usr\bin' - #tee -a "$GITHUB_PATH" <<< 'C:\msys64\mingw64\bin' - - if: matrix.arch == 'x86' && matrix.toolchain == 'mingw' - shell: bash - run: tee -a "$GITHUB_PATH" <<< 'C:\mingw32\bin' - - run: echo "%PATH%" - - run: echo "$PATH" - shell: bash + #- if: matrix.toolchain != 'msvc' + # shell: bash + # run: | + # tee -a "$GITHUB_PATH" <<< 'C:\msys64\usr\bin' + #- if: matrix.arch == 'x86' && matrix.toolchain == 'mingw' + # shell: bash + # run: tee -a "$GITHUB_PATH" <<< 'C:\mingw32\bin' - name: Install LCOV if: matrix.toolchain != 'msvc' run: pacman --sync --noconfirm --verbose mingw-w64-x86_64-lcov - run: /c/msys64/mingw64/bin/lcov --version shell: bash + - name: Configure path + if: matrix.toolchain != 'msvc' + shell: bash + run: | + # We need to add MSYS2's mingw64 to the path so that LCOV can find it's own geninfo utility. However, we do + # this before all other mingw installs (including those from install-qt-action) so those take precendence. + tee -a "$GITHUB_PATH" <<< 'C:\msys64\mingw64\bin' + # For 32-bit (x86) MinGW builds, place GitHub's mingw32 at the head of the path (install-qt-actions could + # supersede this below, but we never install (32-bit) mingw32 via install-qt-actions). + [[ '${{ matrix.toolchain }}' != 'mingw' || '${{ matrix.arch }}' != 'x86' ]] || + tee -a "$GITHUB_PATH" <<< 'C:\mingw32\bin' + - run: echo "%PATH%" + - run: echo "$PATH" + shell: bash #- run: dir C:\msys64 /s #- run: dir C:\ #- run: C:\mingw64\bin\gcov.exe --version