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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
|
name: Build and test Qbs
on: [push]
jobs:
build-linux:
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Build on Linux (gcc)',
options: 'modules.cpp.compilerWrapper:ccache modules.qbs.debugInformation:true modules.qbsbuildconfig.enableBundledQt:true',
script: './scripts/build-qbs-with-qbs.sh',
cacheid: 'gcc',
}
env:
BUILD_OPTIONS: ${{ matrix.config.options }}
WITH_TESTS: 0
steps:
- uses: actions/checkout@v1
- name: Create .ccache dir
run: mkdir -p ~/.ccache
- name: prepare timestamp
id: ccache_cache_timestamp
run: |
export TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo ::set-output name=timestamp::$TIMESTAMP
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-
- name: Pull the Bionic Image
run: docker-compose pull bionic
- name: Print ccache stats
run: docker-compose run bionic ccache -s
- name: Build Qbs
run: docker-compose run bionic ${{ matrix.config.script }}
- name: Print ccache stats
run: docker-compose run bionic ccache -s
- name: Create acrhive
run: tar -C release/install-root/ -cJf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz usr/local
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
path: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
build-linux-extra:
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Build on Linux (clang_tidy)',
script: './scripts/run-analyzer.sh',
options: 'profile:qt-clang_64 modules.cpp.compilerWrapper:ccache',
cacheid: 'clang',
}
- {
name: 'Build on Linux (CMake)',
script: './scripts/build-qbs-with-cmake.sh',
cacheid: 'cmake',
}
- {
name: 'Build on Linux (QMake)',
script: './scripts/build-qbs-with-qmake.sh',
options: 'CONFIG+=ccache',
cacheid: 'qmake',
}
env:
BUILD_OPTIONS: ${{ matrix.config.options }}
QTEST_FUNCTION_TIMEOUT: 9000000
steps:
- uses: actions/checkout@v1
- name: Create .ccache dir
run: mkdir -p ~/.ccache
- name: prepare timestamp
id: ccache_cache_timestamp
run: |
export TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo ::set-output name=timestamp::$TIMESTAMP
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-${{ matrix.config.cacheid }}-ccache-
- name: Pull the Bionic Image
run: docker-compose pull bionic
- name: Print ccache stats
run: docker-compose run bionic ccache -s
- name: Build Qbs
run: docker-compose run bionic ${{ matrix.config.script }}
- name: Print ccache stats
run: docker-compose run bionic ccache -s
build-macos:
name: Build on macOS
runs-on: macos-latest
timeout-minutes: 45
env:
BUILD_OPTIONS: 'modules.cpp.compilerWrapper:ccache modules.qbs.debugInformation:true modules.qbsbuildconfig.enableAddressSanitizer:false modules.qbsbuildconfig.enableBundledQt:true'
WITH_TESTS: 0
steps:
- uses: actions/checkout@v1
- name: Create .ccache dir
run: mkdir -p ~/.ccache
- name: prepare timestamp
id: ccache_cache_timestamp
run: |
export TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo ::set-output name=timestamp::$TIMESTAMP
- name: ccache cache files
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-ccache-
- name: Install required packages
run: |
brew install ccache p7zip
/usr/bin/python3 -m pip install --user beautifulsoup4 lxml
- name: Install Qt
uses: ./.github/actions/download-qt
with:
toolchain: clang_64
- name: Install Qt Creator
uses: ./.github/actions/download-qtc
- name: Print ccache stats
run: ccache -s
- name: Setup Qbs
run: |
qbs setup-toolchains --detect
qbs setup-qt --detect
qbs config profiles.qt.baseProfile xcode-macosx-x86_64
qbs config defaultProfile qt
qbs config --list
- name: Build Qbs
run: scripts/build-qbs-with-qbs.sh
- name: Print ccache stats
run: ccache -s
- name: Create acrhive
run: tar -C release/install-root/ -cJf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz usr/local
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
path: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
build-windows:
name: Build on Windows
runs-on: windows-latest
timeout-minutes: 45
env:
BUILD_OPTIONS: 'modules.cpp.compilerWrapper:clcache modules.qbsbuildconfig.enableAddressSanitizer:false modules.qbsbuildconfig.enableBundledQt:true'
WITH_TESTS: 0
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install beautifulsoup4 lxml
pip install git+https://github.com/frerich/clcache.git@cae73d8255d78db8ba11e23c51fd2c9a89e7475b
- name: clcache cache files
uses: actions/cache@v2
with:
path: ~/clcache
key: ${{ runner.os }}-clcache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ runner.os }}-clcache-
- name: Print clcache stats
run: clcache -s
- name: Install Qt
uses: ./.github/actions/download-qt
with:
toolchain: win64_msvc2019_64
- name: Install Qt Creator
uses: ./.github/actions/download-qtc
- name: Setup Qbs
run: |
qbs setup-toolchains --detect
qbs setup-qt $(which qmake).exe qt
qbs config defaultProfile qt
qbs config --list
shell: bash
- name: Build Qbs
run: scripts/build-qbs-with-qbs.sh
shell: bash
- name: Print clcache stats
run: clcache -s
- name: Create acrhive
run: 7z a qbs-${{ runner.os }}-${{ github.run_id }}.7z release/install-root/ -r
shell: bash
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.7z
path: qbs-${{ runner.os }}-${{ github.run_id }}.7z
test-linux:
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
timeout-minutes: 45
needs: build-linux
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Run Linux tests (gcc)',
image: 'bionic',
profile: 'qt-gcc_64',
script: './scripts/test-qbs.sh',
}
- {
name: 'Run Linux tests (clang)',
image: 'bionic',
profile: 'qt-clang_64',
script: './scripts/test-qbs.sh',
}
- {
name: 'Run Android tests (Qt 5.13)',
image: 'bionic-android-513',
profile: '',
script: './scripts/test-qt-for-android.sh',
}
- {
name: 'Run Android tests (Qt 5.14)',
image: 'bionic-android-514',
profile: '',
script: './scripts/test-qt-for-android.sh',
}
env:
QBS_TEST_SOURCE_ROOT: 'tests'
QBS_AUTOTEST_PROFILE: ${{ matrix.config.profile }}
QTEST_FUNCTION_TIMEOUT: 9000000
steps:
- uses: actions/checkout@v1
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
path: ./
- name: Unpack artifact
run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
- name: Pull the Docker Image
run: docker-compose pull ${{ matrix.config.image }}
- name: Run tests
run: docker-compose run ${{ matrix.config.image }} ${{ matrix.config.script }} release/install-root/usr/local/bin
test-baremetal:
name: Run Baremetal tests
runs-on: ubuntu-latest
timeout-minutes: 45
needs: build-linux
env:
QBS_TEST_SOURCE_ROOT: 'tests'
steps:
- uses: actions/checkout@v1
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
path: ./
- name: Unpack artifact
run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
- name: Pull the Focal-Baremetal Image
run: docker-compose pull focal-baremetal
- name: arm-none-eabi-gcc-9_2
run: QBS_AUTOTEST_PROFILE=arm-none-eabi-gcc-9_2 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin
- name: avr-gcc-5_4
run: QBS_AUTOTEST_PROFILE=avr-gcc-5_4 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin
- name: msp430-gcc-4_6
run: QBS_AUTOTEST_PROFILE=msp430-gcc-4_6 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin
- name: sdcc-3_8_0-mcs51
run: QBS_AUTOTEST_PROFILE=sdcc-3_8_0-mcs51 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin
- name: sdcc-3_8_0-stm8
run: QBS_AUTOTEST_PROFILE=sdcc-3_8_0-stm8 docker-compose run focal-baremetal scripts/test-baremetal.sh release/install-root/usr/local/bin
test-macos:
name: ${{ matrix.config.name }}
runs-on: macos-latest
timeout-minutes: 45
needs: build-macos
env:
QTEST_FUNCTION_TIMEOUT: 9000000
QBS_AUTOTEST_PROFILE: 'qt'
QBS_TEST_SOURCE_ROOT: 'tests'
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Run macOS tests (Xcode 11.6)',
target: 'desktop',
toolchain: 'clang_64',
testProfile: 'xcode_11_6-macosx-x86_64',
}
- {
name: 'Run macOS tests (Xcode 10.3)',
target: 'desktop',
toolchain: 'clang_64',
testProfile: 'xcode_10_3-macosx-x86_64',
}
- {
name: 'Run iOS tests (Xcode 11.6)',
target: 'ios',
toolchain: 'ios',
testProfile: 'xcode_11_6-iphoneos-arm64',
}
steps:
- uses: actions/checkout@v1
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
path: ./
- name: Unpack artifact
run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
- name: Update PATH
run: echo ::add-path::./release/install-root/usr/local/bin
- name: Install required packages
run: brew install capnp ccache grpc icoutils makensis protobuf p7zip
- name: Install Qt
uses: ./.github/actions/download-qt
with:
target: ${{ matrix.config.target }}
toolchain: ${{ matrix.config.toolchain }}
- name: Setup Qbs
run: |
qbs setup-toolchains --detect
qbs setup-qt --detect
qbs config profiles.qt.baseProfile ${{ matrix.config.testProfile }}
qbs config defaultProfile qt
qbs config --list
- name: Run Tests
run: ./scripts/test-qbs.sh ./release/install-root/usr/local/bin
test-windows:
name: ${{ matrix.config.name }}
runs-on: windows-latest
timeout-minutes: 45
needs: build-windows
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Run Windows tests (MSVC 2019)',
target: 'desktop',
toolchain: 'win64_msvc2019_64',
testProfile: 'MSVC2019-x64',
}
- {
name: 'Run Windows tests (clang-cl)',
target: 'desktop',
toolchain: 'win64_msvc2019_64',
testProfile: 'clang-cl-x86_64',
}
env:
QTEST_FUNCTION_TIMEOUT: 9000000
QBS_AUTOTEST_PROFILE: 'qt'
QBS_TEST_SOURCE_ROOT: 'tests'
steps:
- uses: actions/checkout@v1
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: qbs-${{ runner.os }}-${{ github.run_id }}.7z
path: ./
- name: Unpack artifact
run: 7z x qbs-${{ runner.os }}-${{ github.run_id }}.7z
shell: bash
- name: Update PATH
run: echo ::add-path::./release/install-root/bin
shell: bash
- name: Install Qt
uses: ./.github/actions/download-qt
with:
toolchain: ${{ matrix.config.toolchain }}
- name: Setup Qbs
run: |
qbs setup-toolchains --detect
qbs setup-qt $(which qmake).exe qt
qbs config profiles.qt.baseProfile ${{ matrix.config.testProfile }}
qbs config defaultProfile qt
qbs config --list
shell: bash
- name: Run Tests
run: ./scripts/test-qbs.sh ./release/install-root/bin
shell: bash
|