From 1d9b2d04dd19f6e35ad9acadb00c9d226543f6e6 Mon Sep 17 00:00:00 2001 From: Christoph Settgast Date: Thu, 10 Aug 2023 22:11:35 +0200 Subject: [PATCH] qt6: Build with mingw as well in CI to avoid accidentally breaking mingw build We dont ship the mingw build, but we want to make sure that it continues to build and not accidentally break it. --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d33470cd0916..b5b985700d91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,8 +181,8 @@ jobs: path: out/Seamly2D-macos.zip if-no-files-found: error - windows: - name: 'Windows: Build' + windows-msvc: + name: 'Windows: Build with msvc' runs-on: windows-latest needs: version env: @@ -254,10 +254,78 @@ jobs: path: Seamly2D-windows.zip if-no-files-found: error + windows-mingw: + name: 'Windows: Build with mingw' + runs-on: windows-latest + needs: version + env: + VERSION_NUMBER: ${{ needs.version.outputs.version_number }} + + steps: + - uses: actions/checkout@v3 + + - uses: jurplel/install-qt-action@v3 + with: + version: ${{ env.QT_VERSION }} + cache: true + arch: 'win64_mingw' + modules: qt5compat qtmultimedia + + - name: update version + shell: bash + run: | + ./scripts/version.sh ${VERSION_NUMBER} + + - name: make seamly2d.exe and seamlyme.exe + run: | + qmake.exe Seamly2D.pro -config release CONFIG+=noTests + mingw32-make + + - name: create seamly2d-installer.exe + # copy seamly2d and seamlyme directory trees prepared by windeployqt and create installer + # uses parameters in seamly2d-installer.nsi to create the installer exe + run: | + mkdir ..\windows-build + Copy-Item -Path 'src\app\seamly2d\bin\*' -Destination ..\windows-build -Recurse + Copy-Item -Path 'src\app\seamlyme\bin\*' -Destination ..\windows-build -Recurse -Force + Copy-Item -Path dist\seamly2d-installer.nsi -Destination ..\windows-build + cd ..\windows-build\ + & 'C:\Program Files (x86)\NSIS\makensis.exe' seamly2d-installer.nsi + + - name: setup signing + id: setup_signing + uses: timheuer/base64-to-file@v1.2 + env: + PFX_BASE64: ${{ secrets.pfx_base64 }} + if: ${{ env.PFX_BASE64 }} + with: + encodedString: ${{ secrets.pfx_base64 }} + fileName: seamly2d.pfx + + - name: sign installer + env: + PFX_BASE64: ${{ secrets.pfx_base64 }} + if: ${{ env.PFX_BASE64 }} + run: | + cd ..\windows-build\ + SignTool sign /fd SHA256 /f ${{ steps.setup_signing.outputs.filePath }} /p ${{ secrets.pfx_password }} /t http://timestamp.sectigo.com Seamly2D-installer.exe + + - name: pack installer file into .zip + run: | + cd ..\windows-build\ + C:\"Program Files"\7-Zip\7z.exe a Seamly2D-windows-mingw.zip Seamly2D-installer.exe + copy Seamly2D-windows-mingw.zip ..\Seamly2D\ + + - uses: actions/upload-artifact@v3 + with: + name: Seamly2D-windows-mingw.zip + path: Seamly2D-windows-mingw.zip + if-no-files-found: error + publish: if: false runs-on: ubuntu-latest - needs: [version, windows, linux, macos] + needs: [version, windows-msvc, linux, macos] env: VERSION_NUMBER: ${{ needs.version.outputs.version_number }}