-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
530 lines (477 loc) · 29.9 KB
/
appveyor.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
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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: '{build}-{branch}'
# branches to build
branches:
# whitelist
only:
- develop
- master
skip_commits:
files:
- ".cirrus.yml"
# Do not build on tags (GitHub and BitBucket)
skip_tags: true
platform:
- x86
- x64
#---------------------------------#
# environment setup #
#---------------------------------#
# Do not set clone depth, we need all the tags to automatically detect the version based on git describe
# clone_depth: 1
# fetch repository as zip archive
shallow_clone: false # default is "false"
environment:
ACCESS_TOKEN:
secure: RUhnEHqaR8KhalOMWwZZOoO342Ja50QV4KpEWdm9g3pG+jG7i6aJqUmeKF1l5VN6dzksk1u+yN6pOLnU8oGcaVQ6v+1dpKK1oZvF0tyHhNE=
APPVEYOR_SAVE_CACHE_ON_ERROR: "true"
VALENTINA_VERSION: 0_7_53
matrix:
- job_name: MacOS_13_Qt_6 (multibundle)
job_group: 'MacOS_13 (Qt6)'
APPVEYOR_BUILD_WORKER_IMAGE: macos-ventura
COMPILER: clang
QT_VERSION: Qt6
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 14.3.0
TARGET_PLATFORM: "macOS_13+"
MACOS_DEPLOYMENT_TARGET: 13.0
MULTI_BUNDLE: true
DEPLOY: true
- job_name: MacOS_13_Qt_6 (singlebundle)
job_group: 'MacOS_13 (Qt6)'
APPVEYOR_BUILD_WORKER_IMAGE: macos-ventura
COMPILER: clang
QT_VERSION: Qt6
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 14.3.0
TARGET_PLATFORM: "macOS_13+"
MACOS_DEPLOYMENT_TARGET: 13.0
MULTI_BUNDLE: false
DEPLOY: true
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
job_group: 'Windows (qbs)'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
COMPILER_CPPSTD: gnu17
COMPILER_LIBCXX: libstdc++11
QT: Qt\5.15\mingw81_32
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
GCC_VERSION: 8.1
MINGW_PATH: C:\Qt\Tools\mingw810_32\bin
ARCH: x86
PYTHON: "C:\\Python311"
TARGET_PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: False
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
job_group: 'Windows (qbs)'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
COMPILER_CPPSTD: gnu17
COMPILER_LIBCXX: libstdc++11
QT: Qt\5.15\mingw81_64
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
GCC_VERSION: 8.1
MINGW_PATH: C:\Qt\Tools\mingw810_64\bin
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: false
RUN_TESTS: true
WITH_CRASH_REPORTING: False
- job_name: Windows_Qt_5_15_(qbs_MSVC_x64)
job_group: 'Windows (qbs)'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: msvc
QT: Qt\5.15\msvc2019_64
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\"
VSVER: 16
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows7+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: false
RUN_TESTS: true
WITH_CRASH_REPORTING: False
matrix:
fast_finish: false
exclude:
- platform: x86
job_name: Windows_Qt_5_15_(qbs_GCC_x64)
- platform: x86
job_name: Windows_Qt_5_15_(qbs_MSVC_x64)
- platform: x86
job_name: MacOS_13_Qt_6 (multibundle)
- platform: x86
job_name: MacOS_13_Qt_6 (singlebundle)
- platform: x64
job_name: Windows_Qt_5_15_(qbs_GCC_x86)
for:
#---------------------------------#
# Windows #
#---------------------------------#
-
matrix:
only:
- job_group: 'Windows (qbs)'
# clone directory
clone_folder: c:\projects\valentina
cache:
- C:\Users\appveyor\.conan\data -> conan-cache
# scripts that are called at very beginning, before repo cloning
init:
# Uncomment if need access through RDP
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ver
# Path before
- path
- set QTDIR=C:\%QT%
- set QT_PLUGIN_PATH=%QTDIR%\plugins
- set PATH=%QTDIR%\bin;%QTDIR%\include;C:\ProgramData\chocolatey\bin;C:\Qt\Tools\QtCreator\bin;C:\Tools\PsTools;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\Git LFS;C:\Tools\GitVersion;C:\Windows\system32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\CMake\bin;%PYTHON%;%PYTHON%\Scripts;C:\Program Files (x86)\Inno Setup 6
# Set VC variables for the platform
- ps: |
& choco install qbs -y --version=2.4.2
if ($env:COMPILER -eq "msvc") {
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2022") {
if ($env:ARCH -eq "x64") {
cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
} elseif ($env:ARCH -eq "arm64") {
cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat`" && set > %temp%\vcvars.txt"
} else {
cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat`" && set > %temp%\vcvars.txt"
}
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2019") {
if ($env:ARCH -eq "x64") {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
} elseif ($env:ARCH -eq "arm64") {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat`" && set > %temp%\vcvars.txt"
} else {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat`" && set > %temp%\vcvars.txt"
}
}
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
} else {
if ($env:CHOCOLATEY_PACKAGES -eq "true") {
& choco install mingw -y --version $env:CHOCOLATEY_MINGW_VERSION
}
$env:Path += ";$env:MINGW_PATH"
$env:CC = "gcc.exe"
$env:CXX = "g++.exe"
}
# Path after
- path
# Check that we have the expected version for Python
- (python --version)
# Install the build dependencies of the project.
- (python -m pip install --upgrade pip)
- if "%DEPLOY%" == "true" (python -m pip install dropbox py7zr)
- python -m pip install conan==1.63.0
- dir "C:\"
- dir "C:\Qt"
- dir "C:\Qt\Tools"
- dir %QTDIR%
- dir "%QTDIR%\bin"
- qbs --version
before_build:
- echo %APPVEYOR_BUILD_FOLDER%
- cd %APPVEYOR_BUILD_FOLDER%
- qbs-setup-toolchains --detect
- qbs-setup-qt %QTDIR%\bin\%QMAKE% qt6
- qbs-config defaultProfile qt6
- dir "C:\Qt\Tools"
- conan config install https://gist.github.com/dismine/0abab496338183c36661e635c2aeab8d.git
- type C:\Users\appveyor\.conan\settings.yml
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Windows valentina
- ps: |
if ($env:ARCH -eq "x64") {
& conan profile update settings.arch=x86_64 valentina
} else {
& conan profile update settings.arch=x86 valentina
}
if ($env:COMPILER -eq "msvc")
{
& qbs-setup-toolchains.exe --type msvc $env:MSVC_PATH\cl.exe $env:COMPILER
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
& conan profile update settings.compiler=msvc valentina
& conan profile update settings.compiler.cppstd=17 valentina
& conan profile update settings.compiler.runtime=dynamic valentina
& conan profile update settings.compiler.runtime_type=Release valentina
& conan profile update settings.compiler.version=192 valentina
}
else
{
& qbs-setup-toolchains.exe --type mingw $env:MINGW_PATH\g++.exe $env:COMPILER
& qbs-config.exe profiles.qt6.baseProfile $env:COMPILER
& conan profile update settings.compiler=gcc valentina
& conan profile update settings.compiler.cppstd=$env:COMPILER_CPPSTD valentina
& conan profile update settings.compiler.libcxx=$env:COMPILER_LIBCXX valentina
& conan profile update settings.compiler.version=$env:GCC_VERSION valentina
}
- qbs-config --list profiles
build_script:
- conan profile list
- conan install . -s os=Windows --build=missing -o with_crash_reporting=%WITH_CRASH_REPORTING% -o with_xerces=True -pr=valentina
- set VALENTINA_BUILD_FOLDER=%APPVEYOR_BUILD_FOLDER%\build
- echo %VALENTINA_BUILD_FOLDER%
- qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\release\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:%WITH_CRASH_REPORTING% project.conanWithXerces:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%
test_script:
- path
- if "%RUN_TESTS%" == "true" (qbs -p autotest-runner -d %VALENTINA_BUILD_FOLDER% profile:qt6 config:release)
deploy_script:
- ps: |
if ($env:WITH_CRASH_REPORTING -eq "True") {
$qmakeOutput = & "$env:QTDIR\bin\$env:QMAKE" -query QT_VERSION
$majorMinorVersion = $qmakeOutput -replace '(\d+)\.(\d+).*', '$1_$2'
$env:CRASH_QT_VERSION = $majorMinorVersion
$env:CRASH_SHORT_SHA = git log --pretty=format:%h -n 1
}
- ps: scripts/install_dump_sysms.ps1
- if "%WITH_CRASH_REPORTING%" == "True" (python scripts/symupload.py %VALENTINA_BUILD_FOLDER%\release\install-root\valentina %VALENTINA_VERSION% g%CRASH_SHORT_SHA% %CRASH_QT_VERSION% --clean)
- if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %VALENTINA_BUILD_FOLDER% -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%VALENTINA_BUILD_FOLDER%\release\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:%WITH_CRASH_REPORTING% project.conanWithXerces:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%)
- ps: scripts/appveyor-deploy.ps1
on_finish:
# Uncomment if need access through RDP
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
#---------------------------------#
# MacOS #
#---------------------------------#
-
matrix:
only:
- job_group: 'MacOS_13 (Qt6)'
environment:
CONAN_USER_HOME: /Users/appveyor
HOMEBREW_NO_INSTALL_CLEANUP: 1
# Should contain the base64 of the certificate
MACOS_CERTIFICATE:
secure: 9y7jdtpQsjn/2NnNQd7Il6YeRiHVoMEXma3wDcOX3hcKXc6i7TggoWt5ZlvX7WgnLEa1G89rJiNR3H+expso/QH3IMXtzKSqqVnjti1zKaGBdFl1Rzo0nmADRpSivpZ0LgQMCUB7O3e5JecVDkzr0H38HVEs8jWvp9rry2OoQofvwo9NbzZXx1iBYB8a/JQ9TypbXwrFXmXoiY6/0n73TYcKntZCREF6cqgmtcEzdgeoSa3loo7u0ZGAXzGQq9AWc+kQP5hmmktYOjyzuaHUn3eZusTcq12jS62Y14yrzRjtAR3IL525e+2e99gpjC3pwcUeQO8jaujEoWzZhU6GedDP2TCoJ2rOCLvO0aziTaTw+feGgPtoh6hlxKzk9U/68rJeQAH5pCDmah3ZD80rYIKMzEcofpmOvih0EOnil6hIOJTZ77dAFdi32hTNmqKxMRE0QAbTXJliOD9ij04KOE52JLXQKb9yxnIwCd6SkxunEVozkb6HnsveNpdEDMeqdbwBIc/4YGFpkvpkEjnY7b+E34x2sp9VQazyfbvx7sE42nhMXThebPD7teXkTKkkH8O9CCN6DclrG+Aq5k2GrAHTwDOnnjIiOi2tUUwfS0Hz/G2SBsp5DsLSV+tbQtf8nsgcvj2CjwTjwKGok8YgVo8hb8ADULRTfsQaZQk/uqmjLJ+Jck5trxywhl5kjiC10PpmsmDLclT0nNpZ8U//pO8EEIQYCdhdB7CiA07WRZ5St6xx5TtaoMSRZECbViSDWSOYrlzp+ubPvoEG66nBQYteXVIq5dtOJ+8iefPUT6r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fD/deeFJRa/W77+eLvwDtzGkanv4yH9JhbIj5rC5Ut3PvXB6/PKU9cXEVB6mjjCt5whNW/nMmINxHg/O0G80tZNcXosYrVWaepO9zTp2kyEnwGr3iI7CC/yf0nvgFF4gE4Dd3jJMTs0djbHiiRNbqhb+pGoov4EN/6w4OdETZsu20FhDn7htkWqcIAqP0ZiFDCeVXgVtFnIj+XPJn16ke6TDXiDun+ao7+k7E+mFSY9P4KeYfQyFbo67RwNhRLSnEVgCt+7r+rABdl6dx5VGReFYu4qnkWImalTU9mUyoojDjAjjddPQERnho19czbntCAtSajCSrYWq8L8YorK96mXP3vLoZW2If1rbw03kiHBZOuyB4wO7VBrP/tvUEmaiJYOsLBM4gkIF4ZtpCUfFw3kYNCRRNKOih3rI0P4X1bn4RNqIcRmfRu1ax4rWRcC5mSFz6+Ls60VNglhbxLRO/XfJUQgguhDjK0xkGUT/9PUNPdTfsY0HlA7n0R065ItNCyC5F6hkL3wxz/jOUYGfmBdKSdfFI7AYEEiA12TFGPyiliiJTjJT9vAiGMBVuilUUXnnWwHYhNQdhW2kHhVlb8+INncUUNM0PuxUTdz8yVP8AxS5uyBIEhexVElcF+eZpO66QIzUPDZYLtK3B/nceNwR/LStvhhC1wL2YUh/8ddPARrhkpdqh9+2zvPkz/RKxIKjZOauw==
# Should contain the full certificate name, such as Developer ID Application: Your Name (K1234567)
MACOS_CERTIFICATE_NAME:
secure: DfLnepaG+LQMo+w1UvxfgoXI+pb4XtCZSh0rX+f9ZqANcrRNNlI9V7nBzQmNUv7BV+E+NC/s0vtrfcKBx2IEKw==
# Should contain the password you chose when exported the certificate from the Keychain Access app
MACOS_CERTIFICATE_PWD:
secure: ynsawEOq1ysFzKZDR5JMYe5KatOCYHYtnJnJDzsH+20=
# Should contain apple developer email, the same used the Apple Developer subscription
MACOS_NOTARIZATION_APPLE_ID:
secure: JC/QySMcz7ojpEHJEKaxDqTnXgM4zAet7/C6PgIL6GA=
# Should contain the app-specific password
MACOS_NOTARIZATION_PWD:
secure: 5LQu42RbJMmWXmknUs+dcJFuA/7KsqeIbeDBa1L0Qw0=
# Should contain the Team ID
MACOS_NOTARIZATION_TEAM_ID:
secure: Pl/pYbFyfpJOK1O8R94RTQ==
# Should contain a strong, randomly generated password
MACOS_CI_KEYCHAIN_PWD:
secure: B8yHPBym+BTDPK5ZCg7WlSnUCHLbcim8WqLTC6/PSNs=
cache:
- /Users/appveyor/.conan/data -> conanfile.py
- $HOME/brew_cache_dir
init:
- find /Applications -maxdepth 1 -type d -name 'Xcode*.app'
- sudo xcode-select -p
- sudo xcode-select -s /Applications/Xcode-$XCODE_VERSION.app
- sudo xcode-select -p
- xcrun --show-sdk-path -sdk macosx
# Decode the environment variable into a regular .p12 file
- echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
# We need to create a new keychain, otherwise using the certificate will prompt
# with a UI dialog asking for the certificate password, which we can't
# use in a headless CI environment
# Create the keychain with a password ($MACOS_CI_KEYCHAIN_PWD)
- security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
# Make the custom keychain default, so xcodebuild will use it for signing
- security default-keychain -s $HOME/Library/Keychains/build.keychain
# Unlock the keychain
- security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
- security set-keychain-settings $HOME/Library/Keychains/build.keychain
# Check if System.keychain is not cluttered
# good: 60K
# bad: 25MB
- du -h /Library/Keychains/System.keychain
# Add certificates to keychain and allow codesign to access them
# 1) Apple Worldwide Developer Relations Certification Authority
- curl https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer --output $HOME/AppleWWDRCAG3.cer --silent
- sudo security import $HOME/AppleWWDRCAG3.cer -k /Library/Keychains/System.keychain -T /usr/bin/codesign || true
# 2) Developer Authentication Certification Authority
- curl https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer --output $HOME/DeveloperIDG2CA.cer --silent
- sudo security import $HOME/DeveloperIDG2CA.cer -k /Library/Keychains/System.keychain -T /usr/bin/codesign || true
# 3) Developer ID
- security import certificate.p12 -k $HOME/Library/Keychains/build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
# Delete the files, we no longer need them
- rm $HOME/AppleWWDRCAG3.cer
- rm $HOME/DeveloperIDG2CA.cer
- rm certificate.p12
# Set the partition list (sort of like an access control list)
- security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
# Echo the identity, just so that we know it worked.
# This won't display anything secret.
- security find-identity -v -p codesigning
before_build:
- ls ${HOME}/Qt
- export PATH="$HOME/.local/bin:`python3 -m site --user-base`/bin:$HOME/.cargo/bin:$PATH"
- echo $PATH
- python3 --version
- whereis python3
- sudo ln -s -f /usr/bin/python3 /usr/local/bin/python
- sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python
- whereis python
- |-
###############################################################
# Set up macOS dependencies
sudo ln -s /usr/local /opt/local;
cache_tag=usr_local_4 # this can be modified to rebuild deps
cdir=$HOME/brew_cache_dir
cache_tar=$cdir/$cache_tag.tar
cache=$cache_tar.xz
CPUS=$(sysctl -n hw.ncpu)
if [ -d $cdir ] && [ -f $cache ]; then
echo "=== Unpacking cached Homebrew $cache ==="
(
cd /
tar xf $cache
)
echo "done"
else
echo "=== Building dependencies ==="
echo "Couldn't find cache $cache"
ls -alrt "$cdir"
echo "Recording /usr/local state"
python3 ./scripts/treestate.py scan /usr/local usrlocal.json
brew update
brew install coreutils ccache git openssl@3 pkgconf qt6 cmake ninja poppler xerces-c
# Version 2.4.2. Version 2.5.0 crashes.
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/7aa8c7a3818d7d14bbbde1ea42ffca457739c093/Formula/q/qbs.rb > qbs.rb
brew install --formula ./qbs.rb
brew pin qbs
# The build environment is now ready for use. We can complete
# the rest of the process of creating the Homebrew archive
# during the rest of the build, using idle CPU time. To minimise
# the amount of space needed for the archive, we compress with
# xz, which adds only about a minute to the non-cached build.
(
echo "=== Creating cache tarball $cache ==="
echo "Check /usr/local for updates"
python3 ./scripts/treestate.py updates usrlocal.json /usr/local | fgrep -v .git > updated_list
echo Need to record $( wc -l updated_list ) updates
mkdir -p $cdir
rm -f $cdir/*
nice tar cf $cache_tar -T updated_list
echo nice xz -9 -T$CPUS $cache_tar
nice xz -9 -T$CPUS $cache_tar
du -h $cdir
) 2>&1 | sed 's/^/CACHE: /' &
fi
- mkdir ~/.venv
- python3 -m venv ~/.venv
- source ~/.venv/bin/activate
- pip3 install --upgrade pip dropbox py7zr 'urllib3<2.0' conan==1.63.0 requests
- export QTDIR=$(brew --prefix qt6)
- export PATH="$PATH:`python3 -m site --user-base`/bin:$QTDIR/bin"
- echo $PATH
- python3 --version
- clang --version
# Annoying clang issue: clang++ does not respect -isystem flag
- rm /usr/local/include/xercesc || true
- qmake --version
- which qmake
- which qbs
- qbs --version
- /usr/bin/curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}
- cmake ${HOME}/macdeployqt-main -GNinja -S ${HOME}/macdeployqt-main -B ${HOME}/macdeployqt-build-dir -DCMAKE_INSTALL_PREFIX=${HOME}/macdeployqt-install-dir -DCMAKE_BUILD_TYPE=Release
- cmake --build ${HOME}/macdeployqt-build-dir --target install
- cd ${APPVEYOR_BUILD_FOLDER}
build_script:
- pwd
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os_build=Macos valentina
- conan profile update settings.arch=x86_64 valentina
- conan profile update settings.arch_build=x86_64 valentina
- conan profile update settings.compiler=apple-clang valentina
- conan profile update settings.compiler.cppstd=17 valentina
- conan profile update settings.compiler.libcxx=libc++ valentina
- conan profile update settings.compiler.version=15 valentina
- qbs setup-toolchains --detect
- qbs config --list profiles
- qbs setup-qt $(brew --prefix qt6)/bin/qmake qt6
- qbs config defaultProfile qt6
- qbs config profiles.qt6.baseProfile clang
- conan install . -s os=Macos --build=missing -o with_crash_reporting=True -pr=valentina
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/release/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@3)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true project.conanProfiles:valentina
- export QTDIR=$(brew --prefix qt6)
- export CRASH_QT_VERSION=$($QTDIR/bin/qmake -query QT_VERSION | awk -F. '{print $1 "_" $2}')
- export CRASH_SHORT_SHA=$(git log --pretty=format:%h -n 1)
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mozilla/dump_syms/releases/download/v2.3.3/dump_syms-installer.sh | sh
- python3 scripts/symupload.py ${APPVEYOR_BUILD_FOLDER}/build/release/install-root $VALENTINA_VERSION g$CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --clean
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/release/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@3)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true project.conanProfiles:valentina
- |-
if [ "$DEPLOY" = "true" ]; then
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI
echo "Create keychain profile"
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD"
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
# you're curious
echo "Notarize app"
xcrun notarytool submit "${APPVEYOR_BUILD_FOLDER}/build/release/install-root/share/valentina.dmg" --keychain-profile "notarytool-profile" --wait --timeout 5m || true
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
# validated by macOS even when an internet connection is not available.
echo "Attach staple"
xcrun stapler staple ${APPVEYOR_BUILD_FOLDER}/build/release/install-root/share/valentina.dmg || true
fi
deploy_script:
- VALENTINA_WORKING_DIR=${APPVEYOR_BUILD_FOLDER} CIRRUS_CHANGE_IN_REPO=${APPVEYOR_REPO_COMMIT} CIRRUS_BRANCH=${APPVEYOR_REPO_BRANCH} ${APPVEYOR_BUILD_FOLDER}/scripts/cirrus-deploy.sh
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Email
- provider: Email
to:
on_build_success: false
on_build_failure: true
on_build_status_changed: true