forked from qt-creator/qt-creator
Plugin wizard: Enable building against Qt Creator snapshots in github workflow
Change-Id: I36a6ffb878c5bc6a59219424cab5b71bdc12bf33 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -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.
|
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.
|
that the Qt version and Qt Creator version you specify are compatible.
|
||||||
|
|
||||||
## What it does
|
## 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
|
If your plugin requires additional resources besides the plugin library, you need to adapt the
|
||||||
script accordingly.
|
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
|
[1]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-github-actions
|
||||||
|
@@ -5,6 +5,7 @@ on: [push]
|
|||||||
env:
|
env:
|
||||||
QT_VERSION: %{JS: Util.qtVersion()}
|
QT_VERSION: %{JS: Util.qtVersion()}
|
||||||
QT_CREATOR_VERSION: %{JS: Util.qtCreatorVersion()}
|
QT_CREATOR_VERSION: %{JS: Util.qtCreatorVersion()}
|
||||||
|
QT_CREATOR_SNAPSHOT: NO
|
||||||
PLUGIN_PRO: %{ProFile}
|
PLUGIN_PRO: %{ProFile}
|
||||||
PLUGIN_NAME: %{PluginName}
|
PLUGIN_NAME: %{PluginName}
|
||||||
|
|
||||||
@@ -114,7 +115,12 @@ jobs:
|
|||||||
shell: cmake -P {0}
|
shell: cmake -P {0}
|
||||||
run: |
|
run: |
|
||||||
string(REGEX MATCH "([0-9]+.[0-9]+).[0-9]+" outvar "$ENV{QT_CREATOR_VERSION}")
|
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")
|
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||||
set(qtc_output_directory "qtcreator/lib/qtcreator/plugins")
|
set(qtc_output_directory "qtcreator/lib/qtcreator/plugins")
|
||||||
@@ -142,7 +148,7 @@ jobs:
|
|||||||
|
|
||||||
foreach(package qtcreator qtcreator_dev)
|
foreach(package qtcreator qtcreator_dev)
|
||||||
file(DOWNLOAD
|
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
|
execute_process(COMMAND
|
||||||
${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator)
|
${CMAKE_COMMAND} -E tar xvf ../${package}.7z WORKING_DIRECTORY qtcreator)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Reference in New Issue
Block a user