jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
455 stars 78 forks source link

[v4] Install desktop Qt when required to by Qt 6.2+ mobile and WASM #189

Closed ddalcino closed 1 year ago

ddalcino commented 1 year ago

Fix #181. This will allow both mobile and WASM builds to succeed, when using Qt 6.2+. These new versions of Qt require a parallel installation of the desktop version of Qt, installed alongside the mobile or WASM versions.

As a side effect, this PR also fixes a logic bug in the way the arch input is set by default. When the user does not select an arch on Windows, and the target is set to android, the action selects a Windows desktop arch instead of an android arch. The change that fixes this issue is in its own commit: 8cd6038e549907ed4b1a590f662432496adb48a1

This PR makes breaking changes, discussed in the new README_upgrade_guide.md file. For that reason, this change should not be merged into v3 of this action.

This PR uses #179 as a starting point. I needed to use an example project meant for mobile devices in order to test Qt for Android properly, and there are some good ones in the Examples directory that you can install using aqt install-example. It was easier to accomplish that using the changes in #179 than in some other way.

I have added tests for android in their own workflow. This will result in some code duplication, but IMHO it's a lot easier to read and to reason about the tests this way than it would have been if I had added the tests to the existing test.yml workflow.