Skip to content

Commit

Permalink
Github Action move to Qt6 for Qbs build (11)
Browse files Browse the repository at this point in the history
* enable qbs for cmake build
  • Loading branch information
arBmind committed Oct 24, 2021
1 parent 43555d6 commit 9883f80
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- name: Checkout submodules
run: |
git submodule set-url -- perfparser https://code.qt.io/qt-creator/perfparser.git
git submodule set-url -- qbs https://github.com/arBmind/qbs.git
git submodule update --init --recursive
- name: Download Ninja and CMake
Expand Down Expand Up @@ -469,7 +470,6 @@ jobs:
--add-config=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
--add-config=-DIDE_REVISION_URL=https://github.com/$ENV{GITHUB_REPOSITORY}/commits/$ENV{GITHUB_SHA}
--zip-infix=-${{ matrix.config.artifact }}-${{ github.run_id }}
--no-qbs
RESULT_VARIABLE result
COMMAND_ECHO STDOUT
OUTPUT_VARIABLE output
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/build_qbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
- name: "Windows Latest MSVC"
artifact: "Windows-MSVC"
os: windows-latest
qt_version: "5.15.2"
qt_version: "6.2.0"
qt_arch: "win64_msvc2019_64"
libclang_url: "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_120-based-windows-vs2019_64.7z"
libclang_url: "https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_130-based-windows-vs2019_64.7z"

steps:
- name: Get LibClang
Expand All @@ -36,7 +36,7 @@ jobs:
with:
version: "${{ matrix.config.qt_version }}"
arch: "${{ matrix.config.qt_arch }}"
modules: qtbase qtdeclarative qttools qtsvg qtserialport qtquickcontrols qtquickcontrols2 qtgraphicaleffects qtlocation qtimageformats qtquicktimeline qtquick3d qtscript
modules: qtbase qtdeclarative qttools qtsvg qttranslations qtimageformats qtserialport qtquicktimeline qtquick3d qt5compat qtshadertools
cached: ${{ steps.cache-qt.outputs.cache-hit }}

- name: Install Qbs
Expand All @@ -45,18 +45,19 @@ jobs:
- name: Setup Qbs
run: |
qbs setup-toolchains --detect
qbs setup-qt $Env:Qt5_DIR\bin\qmake.exe qt5-15
qbs config qt5-15.baseProfile MSVC2019-x64
qbs config defaultProfile qt5-15
qbs setup-qt $Env:Qt6_DIR\bin\qmake.exe qt6-2
qbs config qt6-2.baseProfile MSVC2019-x64
qbs config defaultProfile qt6-2
qbs config --list profiles
- uses: actions/checkout@v2
with:
path: Repo
- working-directory: Repo
run: |
git submodule update --init src/plugins/help/qlitehtml/litehtml
git submodule update --init src/shared/qbs
git submodule set-url -- perfparser https://code.qt.io/qt-creator/perfparser.git
git submodule set-url -- qbs https://github.com/arBmind/qbs.git
git submodule update --init --recursive
- uses: actions/setup-python@v2
with:
Expand All @@ -75,7 +76,7 @@ jobs:
- name: Deploy
working-directory: ${{ github.workspace }}/install-root
run: |
python -u ${{ github.workspace }}/Repo/scripts/deployqt.py -i --llvm-path ${{ github.workspace }}/libclang ${{ github.workspace }}/install-root/bin/qtcreator.exe $Env:Qt5_DIR/bin/qmake.exe
python -u ${{ github.workspace }}/Repo/scripts/deployqt.py -i --llvm-path ${{ github.workspace }}/libclang ${{ github.workspace }}/install-root/bin/qtcreator.exe $Env:Qt6_DIR/bin/qmake.exe
- name: Pack
working-directory: ${{ github.workspace }}/install-root
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/help/help.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Project {

Depends { name: "Qt"; submodules: ["help", "network", "sql"]; }
Depends { name: "Qt.printsupport" }
Depends { name: "Qt.webenginewidgets"; required: false }
Depends { name: "Qt.webenginewidgets"; required: false; condition: Utilities.versionCompare(Qt.core.version, "6.0") < 0 }

Depends { name: "Aggregation" }
Depends { name: "Utils" }
Expand All @@ -22,7 +22,7 @@ Project {

cpp.defines: {
var defines = base.concat(["QT_CLUCENE_SUPPORT"]);
if (Qt.webenginewidgets.present)
if (Qt.webenginewidgets && Qt.webenginewidgets.present)
defines.push("QTC_WEBENGINE_HELPVIEWER");
if (qlitehtml.present)
defines.push("QTC_LITEHTML_HELPVIEWER")
Expand Down Expand Up @@ -62,7 +62,7 @@ Project {

Group {
name: "WebEngine Sources"
condition: Qt.webenginewidgets.present
condition: Qt.webenginewidgets && Qt.webenginewidgets.present
files: [
"webenginehelpviewer.cpp", "webenginehelpviewer.h"
]
Expand Down
2 changes: 1 addition & 1 deletion src/shared/qbs
7 changes: 4 additions & 3 deletions src/src.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ Project {
qbsSearchPaths: [project.ide_source_tree + "/qbs", qbsBaseDir + "/qbs-resources"]

references: [
qbsBaseDir + "/share/share.qbs",
qbsBaseDir + "/src/app/apps.qbs",
qbsBaseDir + "/src/lib/libs.qbs",
qbsBaseDir + "/src/libexec/libexec.qbs",
qbsBaseDir + "/src/plugins/plugins.qbs",
qbsBaseDir + "/share/share.qbs",
qbsBaseDir + "/src/app/apps.qbs",
qbsBaseDir + "/src/shared/bundledqt/bundledqt.qbs",
qbsBaseDir + "/src/shared/json/json.qbs",
qbsBaseDir + "/src/shared/bundledqt/bundledqt.qbs",
qbsBaseDir + "/src/shared/variant/variant.qbs",
]
}
}

0 comments on commit 9883f80

Please sign in to comment.