Add collapse recursive feature to project trees (2) #799
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Qbs Build Matrix | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: "Windows 2022 MSVC" | |
artifact: "Windows-MSVC" | |
os: windows-2022 | |
qt_version: "6.7.3" | |
qt_arch: "win64_msvc2019_64" | |
qt_modules: qtimageformats qtserialport qtquicktimeline qtquick3d qt5compat qtshadertools qtmultimedia | |
qt_tools: tools_opensslv3_x64,qt.tools.opensslv3.win_x64 | |
qt_version_x86: "5.15.2" | |
qt_arch_x86: "win32_msvc2019" | |
libclang_url: "https://github.com/hicknhack-software/Qt-llvm-project/releases/download/libclang-release_19.1.0_based_23-Sep-2024_14-52/libclang-release_19.1.0-based-windows-vs2019_64.7z" | |
jom_url: "https://download.qt.io/official_releases/jom/jom_1_1_3.zip" | |
qbs_url: "https://download.qt.io/official_releases/qbs/2.4.2/qbs-windows-x86_64-2.4.2.zip" | |
vcvars_x64: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat | |
vcvars_x86: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat | |
steps: | |
- name: Get LibClang | |
shell: cmake -P {0} | |
run: file(DOWNLOAD "${{ matrix.config.libclang_url }}" ./libclang.7z SHOW_PROGRESS) | |
- run: 7z x libclang.7z | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Get Qbs | |
shell: cmake -P {0} | |
run: file(DOWNLOAD "${{ matrix.config.qbs_url }}" ./qbs.zip) | |
- run: | | |
7z x qbs.zip -oqbs | |
echo "${{ github.workspace }}/qbs/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Get JOM | |
shell: cmake -P {0} | |
run: file(DOWNLOAD "${{ matrix.config.jom_url }}" ./jom.zip) | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
dir: ${{ runner.workspace }}/x64 | |
version: "${{ matrix.config.qt_version }}" | |
arch: "${{ matrix.config.qt_arch }}" | |
modules: ${{ matrix.config.qt_modules }} | |
tools: ${{ matrix.config.qt_tools }} | |
cache: true | |
cache-key-prefix: CacheQtx64 | |
extra: '--external 7z' | |
- name: Copy OpenSSL DLLs | |
run: | | |
copy ${{ runner.workspace }}/x64/Qt/Tools/OpenSSLv3/Win_x64/bin/*.dll $Env:Qt6_DIR\bin | |
- name: Setup Qbs | |
run: | | |
qbs setup-toolchains --type msvc $(cmd /c '"${{ matrix.config.vcvars_x64 }}" >nul & where cl') msvc-x64 | |
qbs setup-qt $Env:Qt6_DIR\bin\qmake.exe qt-x64 | |
qbs config profiles.qt-x64.baseProfile msvc-x64 | |
- uses: actions/checkout@v4 | |
with: | |
path: Repo | |
- working-directory: Repo | |
run: | | |
git submodule set-url -- src/tools/perfparser https://code.qt.io/qt-creator/perfparser.git | |
git submodule set-url -- src/shared/qbs https://github.com/hicknhack-software/Qt-Qbs.git | |
git submodule update --init --recursive | |
- name: Build | |
working-directory: Repo | |
run: | | |
$Env:Path += ";${{ github.workspace }}\libclang\bin" | |
$Env:LLVM_INSTALL_DIR = "${{ github.workspace }}\libclang" | |
$Env:QTC_ENABLE_CLANG_LIBTOOLING = "true" | |
$Env:PYTHON_INSTALL_DIR = "$Env:pythonLocation" | |
qbs build -d $ENV:TMP\build ` | |
qbs.installRoot:${{ github.workspace }}/install-root ` | |
profile:qt-x64 config:Release qbs.defaultBuildVariant:release | |
- name: Deploy | |
working-directory: ${{ github.workspace }}/install-root | |
run: | | |
python -u ${{ github.workspace }}/Repo/scripts/deploy.py --llvm-path ${{ github.workspace }}/libclang ${{ github.workspace }}/install-root/bin/qtcreator.exe $Env:Qt6_DIR/bin/qmake.exe | |
- name: x86 Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
dir: ${{ runner.workspace }}/x86 | |
version: "${{ matrix.config.qt_version_x86 }}" | |
arch: ${{ matrix.config.qt_arch_x86 }} | |
cache: true | |
cache-key-prefix: CacheQtx86 | |
extra: '--external 7z' | |
- name: x86 Setup Qbs | |
run: | | |
qbs setup-toolchains --type msvc $(cmd /c '"${{ matrix.config.vcvars_x86 }}" >nul & where cl') msvc-x86 | |
qbs setup-qt $Env:Qt5_DIR\bin\qmake.exe qt-x86 | |
qbs config profiles.qt-x86.baseProfile msvc-x86 | |
- name: x86 Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
architecture: 'x86' | |
- name: x86 Build | |
working-directory: Repo | |
run: | | |
$Env:PYTHON_INSTALL_DIR = "$Env:pythonLocation" | |
qbs build -d $ENV:TMP\build-x86 ` | |
qbs.installRoot:${{ github.workspace }}/install-root ` | |
profile:qt-x86 config:Release qbs.defaultBuildVariant:release ` | |
-p qtcreatorcdbext | |
- name: Add JOM | |
run: 7z x jom.zip -o${{ github.workspace }}/install-root/bin/jom | |
- name: Pack | |
working-directory: ${{ github.workspace }}/install-root | |
run: 7z a ../QtCreator-${{ matrix.config.qt_arch }}-${{ github.run_id }}.7z * -r | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ github.workspace }}/QtCreator-${{ matrix.config.qt_arch }}-${{ github.run_id }}.7z | |
name: QtCreator-${{ matrix.config.qt_arch }}-${{ github.run_id }}.7z | |
- name: Upload binaries to release | |
if: contains(github.ref, 'tags/v') | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
tag: ${{ github.ref }} | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
release_name: Release ${{ github.ref }} | |
# body: ${{ github.event.head_commit.message }} | |
overwrite: true | |
file: ${{ github.workspace }}/QtCreator-${{ matrix.config.qt_arch }}-${{ github.run_id }}.7z |