aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/templates
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-02-14 16:48:22 +0100
committerEike Ziller <eike.ziller@qt.io>2020-02-17 14:51:04 +0000
commit086b4eef07f44f9bbc4b1e65ed158616a7b39ed6 (patch)
treeb518c388b5d9ea523ee84a9665ca088483664fdf /share/qtcreator/templates
parent4205134847da5cbb7ef766622688d74cc3be947b (diff)
Plugin wizard: Enable building against Qt Creator snapshots in github workflow
Change-Id: I36a6ffb878c5bc6a59219424cab5b71bdc12bf33 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'share/qtcreator/templates')
-rw-r--r--share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md8
-rw-r--r--share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml10
2 files changed, 12 insertions, 6 deletions
diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md
index d4019e4644..8481ed15ae 100644
--- a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md
+++ b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_README.md
@@ -16,7 +16,10 @@ The value for `QT_VERSION` specifies the Qt version to use for building the plug
The value for `QT_CREATOR_VERSION` specifies the Qt Creator version to use for building the plugin.
-You need to keep these two values updated for different versions of your plugin, and take care
+The value for `QT_CREATOR_SNAPSHOT` can either be `NO` or `latest` or the build ID of a specific
+snapshot build for the Qt Creator version that you specified.
+
+You need to keep these values updated for different versions of your plugin, and take care
that the Qt version and Qt Creator version you specify are compatible.
## What it does
@@ -35,7 +38,4 @@ The build job consists of several steps:
If your plugin requires additional resources besides the plugin library, you need to adapt the
script accordingly.
-Only released versions of Qt and Qt Creator are supported. Building against Qt Creator snapshots
-is currently not supported.
-
[1]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions
diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml
index 8c86a99020..9cf6aa0782 100644
--- a/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml
+++ b/share/qtcreator/templates/wizards/qtcreatorplugin/github_workflow_build_qmake.yml
@@ -5,6 +5,7 @@ on: [push]
env:
QT_VERSION: %{JS: Util.qtVersion()}
QT_CREATOR_VERSION: %{JS: Util.qtCreatorVersion()}
+ QT_CREATOR_SNAPSHOT: NO
PLUGIN_PRO: %{ProFile}
PLUGIN_NAME: %{PluginName}
@@ -114,7 +115,12 @@ jobs:
shell: cmake -P {0}
run: |
string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}")
- set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}")
+
+ set(qtc_base_url "https://download.qt.io/official_releases/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}/installer_source")
+ set(qtc_snapshot "$ENV{QT_CREATOR_SNAPSHOT}")
+ if (qtc_snapshot)
+ set(qtc_base_url "https://download.qt.io/snapshots/qtcreator/${CMAKE_MATCH_1}/$ENV{QT_CREATOR_VERSION}/installer_source/${qtc_snapshot}")
+ endif()
if ("${{ runner.os }}" STREQUAL "Windows")
set(qtc_output_directory "qtcreator/lib/qtcreator/plugins")
@@ -142,7 +148,7 @@ jobs:
foreach(package qtcreator qtcreator_dev)
file(DOWNLOAD
- "${qtc_base_url}/installer_source/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS)
+ "${qtc_base_url}/${qtc_platform}/${package}.7z" ./${package}.7z SHOW_PROGRESS)
execute_process(COMMAND
${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator)
endforeach()