forked from qbs/qbs
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (111 loc) · 4.84 KB
/
build_qbs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Build with Qbs
on: [push, pull_request]
jobs:
windows-qbs:
name: "${{ matrix.config.name }}"
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: "Qt 6.5.3 MSVC2022_64"
os: windows-2022
qt_version: "6.5.3"
qt_arch: win64_msvc2019_64
qt_modules: qt5compat qttools
vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
windeploy_options: --no-system-d3d-compiler --no-opengl-sw
pack_name: "Qbs-Qt65-msvc2019_64-${{ github.run_id }}"
- name: "Qt 6.4.2 MSVC2022_64"
os: windows-2022
qt_version: "6.4.2"
qt_arch: win64_msvc2019_64
qt_modules: qt5compat qttools
vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
windeploy_options: --no-system-d3d-compiler --no-opengl-sw
pack_name: "Qbs-Qt64-msvc2019_64-${{ github.run_id }}"
- name: "Qt 6.3.2 MSVC2022_64"
os: windows-2022
qt_version: "6.3.2"
qt_arch: win64_msvc2019_64
qt_modules: qt5compat qttools
vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
windeploy_options: --no-system-d3d-compiler --no-opengl-sw
pack_name: "Qbs-Qt63-msvc2019_64-${{ github.run_id }}"
- name: "Qt 6.2.4 MSVC2019_64"
os: windows-2019
qt_version: "6.2.4"
qt_arch: win64_msvc2019_64
qt_modules: qt5compat qttools
vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
windeploy_options: --no-system-d3d-compiler --no-opengl-sw
pack_name: "Qbs-Qt62-win64_msvc2019_64-${{ github.run_id }}"
- name: "Qt 5.15 MSVC2019_64"
os: windows-2019
qt_version: "5.15.2"
qt_arch: win64_msvc2019_64
qt_modules: qtscript qttools
vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
windeploy_options: --no-system-d3d-compiler --no-angle --no-opengl-sw
pack_name: "Qbs-win64_msvc2019_64-${{ github.run_id }}"
steps:
- name: Generate Cache Keys
run: |
echo "${{ matrix.config.qt_arch }}" >> cache-qt.txt
echo "${{ matrix.config.qt_modules }}" >> cache-qt.txt
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: QtCache-${{ matrix.config.qt_version }}-${{ hashFiles('cache-qt.txt') }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: "${{ matrix.config.qt_version }}"
arch: "${{ matrix.config.qt_arch }}"
modules: ${{ matrix.config.qt_modules }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install Qbs
run: choco install qbs
- name: Setup Qbs
run: |
qbs setup-toolchains --type msvc $(cmd /c '"${{ matrix.config.vcvars }}" >nul & where cl') msvc
qbs setup-qt $(cmd /c where qmake) qt
qbs config profiles.qt.baseProfile msvc
qbs config defaultProfile qt
qbs config --list profiles
- uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: >-
qbs build -d $ENV:TMP\build
qbs.installRoot:${{ github.workspace }}/install-root
config:Release qbs.defaultBuildVariant:release
project.withDocumentation:false
project.withTests:false
- name: Deploy
working-directory: ${{ github.workspace }}/install-root/bin
run: |
windeployqt qbscore.dll --no-compiler-runtime --no-translations
windeployqt qbs-config-ui.exe --no-compiler-runtime --no-translations ${{ matrix.config.windeploy_options }}
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue iconengines, imageformats
- name: Pack
working-directory: ${{ github.workspace }}/install-root
run: 7z a ../${{ matrix.config.pack_name }}.7z * -r
- name: Upload
uses: actions/upload-artifact@v1
with:
path: ./${{ matrix.config.pack_name }}.7z
name: ${{ matrix.config.pack_name }}.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 }}/${{ matrix.config.pack_name }}.7z