Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt6: Build with mingw as well in CI to avoid accidentally breaking mingw build #1012

Merged
merged 8 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 64 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,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 @@ -248,10 +248,71 @@ 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

- name: Remove preinstalled mingw
# we use the same mingw from Qt tools instead of the github actions hosted runner one, so that its as close as possible to developer setup
# in addition, the code was not compiling with the provided one and just failing with a nondescript "error 1"
shell: bash
run: |
choco uninstall mingw -y

- uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
cache: true
arch: win64_mingw
modules: qt5compat qtmultimedia
tools: tools_mingw90

- name: update version
shell: bash
run: |
./scripts/version.sh ${VERSION_NUMBER}

- name: make seamly2d.exe and seamlyme.exe
shell: bash
# we use the same mingw from Qt tools so that its as close as possible to developer setup
run: |
export "PATH=/d/a/Seamly2D/Qt/Tools/mingw1120_64/bin:$PATH"
qmake.exe Seamly2D.pro -config release CONFIG+=noTests
mingw32-make -j2

- 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: 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
3 changes: 3 additions & 0 deletions src/app/seamly2d/core/vapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
#include <QThread>
#include <QDateTime>
#include <QIcon>
#include <QJsonObject>
#include <QJsonValue>
#include <QJsonDocument>

QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
Expand Down
Loading