generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 83
245 lines (219 loc) · 7.62 KB
/
test.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: action/
- run: |
cd action
npm ci || npm install
shell: bash
- run: |
cd action
npm run lint
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- ubuntu-20.04
- windows-2022
- windows-2019
- macos-12
- macos-13
- macos-14
aqtversion:
- null # use whatever the default is
src-doc-examples:
- false
qt:
- version: "5.9.0"
requested: "5.9.0"
modules: qtwebengine
- version: "5.15.2"
requested: "5.15"
modules: qtwebengine
- version: "6.3.2" # Qt 6.3 is not an LTS version, so '6.3.*' always resolves to '6.3.2'
requested: "6.3.*"
# In Qt 6.2.0+, qtwebengine requires qtpositioning and qtwebchannel
modules: qtwebengine qtpositioning qtwebchannel
- version: "6.7.0"
requested: "6.7.0"
modules: qtwebengine qtpositioning qtwebchannel
- tools-only-build: true
add-tools-to-path: true
cache:
- cached
- uncached
include:
- os: ubuntu-20.04
src-doc-examples: true
source: true
src-archives: qtcharts
check-dir: ../Qt/5.15.2/Src
check: qtcharts/src/src.pro
- os: ubuntu-20.04
src-doc-examples: true
documentation: true
doc-archives: qmake
doc-modules: qtcharts qtwebengine
check-dir: ../Qt/Docs/Qt-5.15.2
check: qmake/qmake-tutorial.html qtcharts/qtcharts-index.html qtwebengine/qtwebengine-index.html
- os: ubuntu-20.04
src-doc-examples: true
examples: true
example-archives: qtsensors
example-modules: qtcharts qtwebengine
check-dir: ../Qt/Examples/Qt-5.15.2
check: charts/charts.pro sensors/sensors.pro webengine/webengine.pro
- os: ubuntu-22.04
aqtversion: "==3.1.*"
qt:
version: "5.15.2"
requested: "5.15"
modules: qtwebengine
- os: ubuntu-22.04
qt:
tools-only-build: true
add-tools-to-path: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: action/
- run: |
cd action
npm ci || npm install
shell: bash
- run: |
cd action
npm run build
- name: Install Qt with options and default aqtversion
if: ${{ !matrix.aqtversion && matrix.qt.version }}
uses: ./
with:
modules: ${{ matrix.qt.modules }}
version: ${{ matrix.qt.requested }}
tools: tools_ifw tools_qtcreator,qt.tools.qtcreator
cache: ${{ matrix.cache == 'cached' }}
- name: Install Qt with options and specified aqtversion
if: ${{ matrix.aqtversion && matrix.qt.version }}
uses: ./
with:
aqtversion: ${{ matrix.aqtversion }}
modules: ${{ matrix.qt.modules }}
version: ${{ matrix.qt.requested }}
tools: tools_ifw tools_qtcreator,qt.tools.qtcreator
cache: ${{ matrix.cache == 'cached' }}
- name: Switch macOS Xcode version with older Qt versions
if: ${{ matrix.qt.version && (startsWith(matrix.os, 'macos-13') || startsWith(matrix.os, 'macos-14')) }}
shell: pwsh
env:
QT_VERSION: ${{ matrix.qt.version }}
run: |
if ([version]$env:QT_VERSION -ge [version]"6.5.3") {
# GitHub macOS 13/14 runners use Xcode 15.0.x by default which has a known linker issue causing crashes if the artifact is run on macOS <= 12
sudo xcode-select --switch /Applications/Xcode_15.2.app
} else {
# Keep older Qt versions on Xcode 14 due to concern over QTBUG-117484
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
}
- name: Configure test project on windows
if: ${{ matrix.qt.version && startsWith(matrix.os, 'windows') }}
env:
QT_VERSION: ${{ matrix.qt.version }}
run: |
cd tests/TestWithModules
for /f "delims=" %%d in ( 'vswhere.exe -latest -property installationPath' ) do @( call "%%d\VC\Auxiliary\Build\vcvars64.bat" )
IF "%QT_VERSION:~0,1%"=="5" ( dir %Qt5_DIR% ) ELSE ( dir %QT_ROOT_DIR%\lib\cmake )
qmake
cmake -S . -B ./build
shell: cmd
- name: Configure test project on unix
if: ${{ matrix.qt.version && !startsWith(matrix.os, 'windows') }}
env:
QT_VERSION: ${{ matrix.qt.version }}
run: |
cd tests/TestWithModules
if [[ $QT_VERSION == 6* ]]; then
ls "${QT_ROOT_DIR}/lib/cmake"
else
ls "${Qt5_DIR}"
fi
qmake
cmake -S . -B ./build
shell: bash
- name: Install source
if: ${{ matrix.source }}
uses: ./
with:
version: "5.15.2"
source: true
no-qt-binaries: true
src-archives: ${{ matrix.src-archives }}
- name: Install docs
if: ${{ matrix.documentation }}
uses: ./
with:
version: "5.15.2"
documentation: true
no-qt-binaries: true
doc-archives: ${{ matrix.doc-archives }}
doc-modules: ${{ matrix.doc-modules }}
- name: Install examples
if: ${{ matrix.examples }}
uses: ./
with:
version: "5.15.2"
examples: true
no-qt-binaries: true
example-archives: ${{ matrix.example-archives }}
example-modules: ${{ matrix.example-modules }}
- name: Test source, docs, examples
if: ${{ matrix.src-doc-examples }}
shell: bash
run: |
cd ${{ matrix.check-dir }}
ls ${{ matrix.check }}
- name: Install tools with options
if: ${{ matrix.qt.tools-only-build }}
uses: ./
with:
tools-only: true
tools: tools_ifw tools_qtcreator,qt.tools.qtcreator
add-tools-to-path: ${{ matrix.qt.add-tools-to-path }}
cache: ${{ matrix.cache == 'cached' }}
- name: Test installed tools
if: ${{ matrix.qt.tools-only-build && matrix.qt.add-tools-to-path }}
shell: bash
run: |
echo "Path: ${PATH}"
# Check if QtIFW is installed
which archivegen
archivegen --version
# Check if QtCreator is installed: QtCreator includes the CLI program 'qbs' on all 3 platforms
which qbs
qbs --version
- name: Test that installed tools are not in the path
if: ${{ matrix.qt.tools-only-build && !matrix.qt.add-tools-to-path }}
shell: bash
run: |
echo "Path: ${PATH}"
# Check that QtIFW has been installed
ls ../Qt/Tools/QtInstallerFramework/*/bin/ | grep archivegen
# Check that QtIFW is not in the path
! which archivegen
! archivegen --version
# Check that qbs (from QtCreator) is not in the path
! which qbs
! qbs --version