valentina/appveyor.yml
Roman Telezhynskyi d9afd41753 Fix building.
2024-03-22 10:28:35 +02:00

960 lines
55 KiB
YAML

# 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
# Do not build on tags (GitHub and BitBucket)
skip_tags: true
platform:
- x86
- x64
#---------------------------------#
# environment setup #
#---------------------------------#
# set clone depth
clone_depth: 1 # clone entire repository history if not defined
# 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_52
matrix:
- job_name: Windows_Qt_6_5_(MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
COMPILER: msvc
QT: Qt\6.5\msvc2019_64
QT_VERSION: Qt6_5
BUILD_SYSTEM: "qbs"
QMAKE: qmake.exe
ENABLE_PCH: true
MSVC_PATH: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\Hostx64\\x64"
VSINSTALLDIR: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows10+"
CHOCOLATEY_PACKAGES: false
WINDEPLOYQT_BIN_PATH: "undefined"
WINDEPLOYQT_COMPILER_RUNTIME: "true"
WINDEPLOYQT_NO_COMPILER_RUNTIME: "false"
DEPLOY: true
RUN_TESTS: true
WITH_CRASH_REPORTING: True
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
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_6_5_(GCC_x64)
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
# COMPILER: mingw
# COMPILER_CPPSTD: gnu17
# COMPILER_LIBCXX: libstdc++11
# QT: Qt\6.5\mingw_64
# QT_VERSION: Qt6_5
# BUILD_SYSTEM: "qbs"
# QMAKE: qmake.exe
# ENABLE_PCH: true
# GCC_VERSION: 13.2
# MINGW_PATH: C:\ProgramData\mingw64\mingw64\bin
# ARCH: x64
# PYTHON: "C:\\Python311-x64"
# TARGET_PLATFORM: "Windows10+"
# CHOCOLATEY_PACKAGES: true
# CHOCOLATEY_MINGW_VERSION: 13.2.0
# WINDEPLOYQT_BIN_PATH: "undefined"
# WINDEPLOYQT_COMPILER_RUNTIME: "false"
# WINDEPLOYQT_NO_COMPILER_RUNTIME: "true"
# DEPLOY: true
# RUN_TESTS: true
# WITH_CRASH_REPORTING: False
- job_name: MacOS_12_Qt_5_15 (qbs, multibundle)
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
COMPILER: clang
QT: Qt/5.15/clang_64
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 14.2.0
TARGET_PLATFORM: "macOS_10.13+"
MACOS_DEPLOYMENT_TARGET: 10.13
MULTI_BUNDLE: true
DEPLOY: true
- job_name: MacOS_12_Qt_5_15 (qbs, singlebundle)
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
COMPILER: clang
QT: Qt/5.15/clang_64
QT_VERSION: Qt5_15
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 14.2.0
TARGET_PLATFORM: "macOS_10.13+"
MACOS_DEPLOYMENT_TARGET: 10.13
MULTI_BUNDLE: false
DEPLOY: true
- job_name: MacOS_14_Qt_6_6 (multibundle)
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
COMPILER: clang
QT: Qt/6.6/macos
QT_VERSION: Qt6
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 15.2.0
TARGET_PLATFORM: "macOS_11+"
MACOS_DEPLOYMENT_TARGET: 11.0
MULTI_BUNDLE: true
DEPLOY: true
- job_name: MacOS_14_Qt_6_6 (singlebundle)
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
COMPILER: clang
QT: Qt/6.6/macos
QT_VERSION: Qt6
BUILD_SYSTEM: "qbs"
ARCH: x64
XCODE_VERSION: 15.2.0
TARGET_PLATFORM: "macOS_11+"
MACOS_DEPLOYMENT_TARGET: 11.0
MULTI_BUNDLE: false
DEPLOY: true
- job_name: Windows_Qt_5_15_(make_GCC_x86)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
QT: Qt\5.15\mingw81_32
QT_VERSION: Qt5_15
BUILD_SYSTEM: "make"
MINGW_PATH: C:\Qt\Tools\mingw810_32\bin
ARCH: x86
PYTHON: "C:\\Python311"
TARGET_PLATFORM: "Windows7+"
DEPLOY: false
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
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)
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
- job_name: Windows_Qt_5_15_(make_GCC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: mingw
QT: Qt\5.15\mingw81_64
QT_VERSION: Qt5_15
BUILD_SYSTEM: "make"
MINGW_PATH: C:\Qt\Tools\mingw810_64\bin
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows7+"
DEPLOY: false
- job_name: Windows_Qt_5_15_(nmake_MSVC_x64)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
COMPILER: msvc
QT: Qt\5.15\msvc2019_64
BUILD_SYSTEM: "nmake"
VSVER: 16
ARCH: x64
PYTHON: "C:\\Python311-x64"
TARGET_PLATFORM: "Windows7+"
DEPLOY: false
- job_name: MacOS_12_Qt_5_15 (make)
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
COMPILER: clang
QT: Qt/5.15/clang_64
QT_VERSION: Qt5_15
BUILD_SYSTEM: "make"
ARCH: x64
XCODE_VERSION: 13.4.1
TARGET_PLATFORM: "macOS_10.13+"
DEPLOY: false
matrix:
fast_finish: false
exclude:
# - platform: x86
# job_name: Windows_Qt_6_5_(GCC_x64)
- platform: x86
job_name: Windows_Qt_6_5_(MSVC_x64)
- platform: x86
job_name: Windows_Qt_5_15_(make_GCC_x64)
- platform: x86
job_name: Windows_Qt_5_15_(nmake_MSVC_x64)
- 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_14_Qt_6_6 (multibundle)
- platform: x86
job_name: MacOS_14_Qt_6_6 (singlebundle)
- platform: x86
job_name: MacOS_12_Qt_5_15 (qbs, multibundle)
- platform: x86
job_name: MacOS_12_Qt_5_15 (qbs, singlebundle)
- platform: x86
job_name: MacOS_12_Qt_5_15 (make)
- platform: x64
job_name: Windows_Qt_5_15_(make_GCC_x86)
- platform: x64
job_name: Windows_Qt_5_15_(qbs_GCC_x86)
for:
#---------------------------------#
# Windows #
#---------------------------------#
-
matrix:
only:
# - job_name: Windows_Qt_6_5_(GCC_x64)
- job_name: Windows_Qt_6_5_(MSVC_x64)
- job_name: Windows_Qt_5_15_(qbs_GCC_x64)
- job_name: Windows_Qt_5_15_(qbs_MSVC_x64)
- job_name: Windows_Qt_5_15_(qbs_GCC_x86)
# 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.2.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:
- 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
- qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:true 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 %APPVEYOR_BUILD_FOLDER%\build profile:qt6 config:release)
deploy_script:
- ps: |
if ($env:WITH_CRASH_REPORTING -eq "True") {
$qmakeOutput = %QTDIR%\bin\%QMAKE% -query QT_VERSION
$majorMinorVersion = $qmakeOutput -replace '\D+(\d+)\.(\d+).*', '$1_$2'
$env:CRASH_QT_VERSION = $majorMinorVersion
$env:CRASH_SHORT_SHA = git log --pretty=format:%h -n 1
}
- if "%WITH_CRASH_REPORTING%" == "True" (python3 scripts/symupload.py %APPVEYOR_BUILD_FOLDER%\build\install-root\valentina $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean)
- if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:true 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'))
# Legacy
-
matrix:
only:
- job_name: Windows_Qt_5_15_(make_GCC_x86)
- job_name: Windows_Qt_5_15_(make_GCC_x64)
- job_name: Windows_Qt_5_15_(nmake_MSVC_x64)
# clone directory
clone_folder: c:\projects\valentina
# 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 PATH=%QTDIR%\bin;%QTDIR%\include;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 (x86)\Inno Setup 6
- if NOT "%BUILD_SYSTEM%" == "make" echo "Using Visual Studio %VSVER%.0"
- if "%BUILD_SYSTEM%" == "make" echo "Using MinGW"
# Set VC variables for the platform
- ps: |
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"
} 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"
} else {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat`" && set > %temp%\vcvars.txt"
}
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2017") {
if ($env:ARCH -eq "x64") {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
} else {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat`" && set > %temp%\vcvars.txt"
}
} elseif ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq "Visual Studio 2015") {
if ($env:ARCH -eq "x64") {
cmd.exe /c "call `"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd`" /x64 && call `"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat`" x86_amd64 && set > %temp%\vcvars.txt"
} else {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
}
}
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
}
- if "%BUILD_SYSTEM%" == "make" set PATH=%MINGW_PATH%;%PATH%
- if "%BUILD_SYSTEM%" == "nmake" set PATH=C:\Qt\Tools\QtCreator\bin;%PATH%
- if "%DEPLOY%" == "true" set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
# Set paths to libraries
- set PATH=%APPVEYOR_BUILD_FOLDER%\build\src\libs\vpropertyexplorer\bin;%APPVEYOR_BUILD_FOLDER%\build\src\libs\qmuparser\bin;%PATH%
# Path after
- path
# Check that we have the expected version for Python
- if "%DEPLOY%" == "true" (python --version)
# Install the build dependencies of the project.
- if "%DEPLOY%" == "true" (python -m pip install --upgrade pip)
- if "%DEPLOY%" == "true" (python -m pip install dropbox py7zr)
# Trick qmake to not work through MSYS
- del /F "C:\Program Files\Git\usr\bin\sh.exe"
- del /F "C:\Program Files\Git\bin\sh.exe"
- qmake -v
before_build:
- cd %APPVEYOR_BUILD_FOLDER%
- md build
# to run your custom scripts instead of automatic MSBuild
build_script:
- cd build
- if "%DEPLOY%" == "true" (qmake ..\Valentina.pro -r CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noDebugSymbols CONFIG+=noWindowsInstaller) else (qmake ..\Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings)
- if not "%BUILD_SYSTEM%" == "make" (nmake -s) else (mingw32-make -j%NUMBER_OF_PROCESSORS%)
# to run your custom scripts instead of automatic tests
test_script:
- if "%BUILD_SYSTEM%" == "make" (mingw32-make -s check TESTARGS="-silent")
#---------------------------------#
# MacOS #
#---------------------------------#
-
matrix:
only:
- job_name: MacOS_14_Qt_6_6 (multibundle)
- job_name: MacOS_14_Qt_6_6 (singlebundle)
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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JUQgguhDjK0xkGUT/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
# 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:$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 # 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@1.1 pkg-config qbs qt6 cmake ninja poppler xerces-c
# 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
- sudo python3 -m pip install --upgrade pip
- pip3 install --user --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
- git describe --always HEAD
- conan profile new valentina
- conan profile update settings.build_type=Release valentina
- conan profile update settings.os=Macos valentina
- conan profile update settings.os.Macos.sdk_version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.os.os_build=Macos valentina
- conan profile update settings.os.arch=x86_64 valentina
- conan profile update settings.os.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=libstdc++11 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/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@1.1)/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
- 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)
- python3 scripts/symupload.py ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --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/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@1.1)/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
# 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/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/install-root/share/valentina.dmg || true
deploy_script:
- CIRRUS_WORKING_DIR=${APPVEYOR_BUILD_FOLDER} CIRRUS_CHANGE_IN_REPO=${APPVEYOR_REPO_COMMIT} CIRRUS_BRANCH=${APPVEYOR_REPO_BRANCH} ${APPVEYOR_BUILD_FOLDER}/scripts/cirrus-deploy.sh
-
matrix:
only:
- job_name: MacOS_12_Qt_5_15 (qbs, multibundle)
- job_name: MacOS_12_Qt_5_15 (qbs, singlebundle)
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//pO8EEIQYCdhdB7CiA07WRZ5St6x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KTC5UNEzPKcf9hp5T3R6cjBqPRFrKLcWDS3tOStt7ESb4WINwZJlmdS77bjfD/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
# 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 QTDIR="${HOME}/${QT}"
- export PATH="$QTDIR/bin:$HOME/.local/bin:`python3 -m site --user-base`/bin:${HOME}/Qt/Qt Creator.app/Contents/MacOS:$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 # 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 pkg-config qbs qt6 cmake ninja poppler
# 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
- sudo python3 -m pip install --upgrade pip
- pip3 install --user --upgrade pip dropbox py7zr 'urllib3<2.0' conan==1.63.0 requests
- export PATH="`brew --prefix qbs`/bin:$PATH"
- echo $PATH
- clang --version
- qmake --version
- which qmake
- 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 -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
# Clean /usr/local/include from Qt6
- find /usr/local/include -type l -name 'Qt*' > /tmp/qt_symlinks.txt
- cat /tmp/qt_symlinks.txt
- xargs -I {} unlink {} < /tmp/qt_symlinks.txt
- 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.Macos.sdk_version=${MACOS_DEPLOYMENT_TARGET} valentina
- conan profile update settings.os_build=Macos valentina
- conan profile update settings.os.arch=x86_64 valentina
- conan profile update settings.os.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=libstdc++11 valentina
- conan profile update settings.compiler.version=14 valentina
- qbs setup-toolchains --detect
- qbs config --list profiles
- qbs setup-qt ${QTDIR}/bin/qmake qt5
- qbs config defaultProfile qt5
- qbs config profiles.qt5.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/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true
- 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)
- python3 scripts/symupload.py ${APPVEYOR_BUILD_FOLDER}/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --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/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir project.enableConan:true project.conanWithCrashReporting:true
# 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/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/install-root/share/valentina.dmg || true
deploy_script:
- CIRRUS_WORKING_DIR=${APPVEYOR_BUILD_FOLDER} CIRRUS_CHANGE_IN_REPO=${APPVEYOR_REPO_COMMIT} CIRRUS_BRANCH=${APPVEYOR_REPO_BRANCH} ${APPVEYOR_BUILD_FOLDER}/scripts/cirrus-deploy.sh
-
matrix:
only:
- job_name: MacOS_12_Qt_5_15 (make)
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
before_build:
- export QTDIR="${HOME}/${QT}"
- export PATH="$QTDIR/bin:$PATH"
- echo $PATH
- clang --version
- qmake --version
- which qmake
- cd ${APPVEYOR_BUILD_FOLDER}
- mkdir build
- cd build
build_script:
- pwd
- qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests CONFIG+=no_ccache
- make -j$(nproc)
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Email
- provider: Email
to:
- dismine@gmail.com
on_build_success: false
on_build_failure: true
on_build_status_changed: true