Skip to content

Commit

Permalink
qt6: Build with mingw as well in CI to avoid accidentally breaking mi…
Browse files Browse the repository at this point in the history
…ngw build

We dont ship the mingw build, but we want to make sure that it continues to build
and not accidentally break it.
  • Loading branch information
csett86 committed Aug 10, 2023
1 parent 95b992c commit 1d9b2d0
Showing 1 changed file with 71 additions and 3 deletions.
74 changes: 71 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/[email protected]
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 }}

Expand Down

0 comments on commit 1d9b2d0

Please sign in to comment.