2021-09-23 09:57:27 +02:00
|
|
|
### Global defaults
|
|
|
|
|
|
|
|
env:
|
2023-02-15 10:05:35 +01:00
|
|
|
CCACHE_SIZE: "800M"
|
2021-09-23 09:57:27 +02:00
|
|
|
CCACHE_DIR: "/tmp/ccache_dir"
|
|
|
|
CCACHE_NOHASHDIR: "1" # Debug info might contain a stale path if the build dir changes, but this is fine
|
2021-09-25 07:42:27 +02:00
|
|
|
CCACHE_CPP2: "yes"
|
2021-09-23 09:57:27 +02:00
|
|
|
|
|
|
|
### Task templates
|
|
|
|
|
|
|
|
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
|
|
|
|
filter_template: &FILTER_TEMPLATE
|
2023-02-14 11:37:27 +01:00
|
|
|
skip: "!changesInclude('.cirrus.yml', '**.{h,hpp,cpp,c,pro,pri,ts,ui,png,qbs,js}')"
|
2021-09-23 09:57:27 +02:00
|
|
|
|
2021-09-25 07:42:27 +02:00
|
|
|
regular_task_template: ®ULER_TASK_TEMPLATE
|
2021-09-23 09:57:27 +02:00
|
|
|
<< : *FILTER_TEMPLATE
|
|
|
|
ccache_cache:
|
|
|
|
folder: "/tmp/ccache_dir"
|
2021-09-25 07:42:27 +02:00
|
|
|
|
2023-02-14 11:37:27 +01:00
|
|
|
linux_qt6_task_template: &LINUX_QT6_TASK_TEMPLATE
|
|
|
|
install_script:
|
2024-01-11 14:05:48 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL -y qt6-base-dev qt6-l10n-tools libqt6svg6-dev qt6-base-dev-tools qmake6 libxerces-c-dev poppler-utils libgl1-mesa-dev"
|
2023-02-14 11:37:27 +01:00
|
|
|
build_script:
|
|
|
|
- uname -a
|
2023-02-16 20:46:08 +01:00
|
|
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
|
|
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
|
|
|
- sleep 1
|
2023-09-13 13:27:32 +02:00
|
|
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
2023-02-14 11:37:27 +01:00
|
|
|
- echo $PATH
|
2023-02-14 19:18:29 +01:00
|
|
|
- which qmake6
|
2023-02-14 11:37:27 +01:00
|
|
|
- which qbs
|
|
|
|
- pwd
|
2023-02-15 12:05:41 +01:00
|
|
|
- ls -l /usr/bin/ | grep -E "${COMPILER_REGEX}"
|
2023-02-15 15:24:25 +01:00
|
|
|
- ${COMPILER} --version
|
2023-02-14 19:18:29 +01:00
|
|
|
- qmake6 --version
|
2023-02-14 11:37:27 +01:00
|
|
|
- qbs --version
|
2023-02-15 12:05:41 +01:00
|
|
|
- qbs setup-toolchains /usr/bin/${COMPILER} ${COMPILER}
|
2023-02-14 19:09:22 +01:00
|
|
|
- qbs setup-qt /usr/bin/qmake6 qt6
|
2023-02-15 12:05:41 +01:00
|
|
|
- qbs config profiles.qt6.baseProfile ${COMPILER}
|
2024-02-05 13:46:30 +01:00
|
|
|
- qbs config defaultProfile qt6
|
2024-01-11 15:49:43 +01:00
|
|
|
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt6 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} modules.cpp.linkerVariant:mold --force-probe-execution
|
2023-02-16 21:00:06 +01:00
|
|
|
- qbs -p autotest-runner -d build profile:qt6 config:release
|
2023-02-16 21:29:45 +01:00
|
|
|
- ccache -s
|
2024-02-05 13:46:30 +01:00
|
|
|
|
|
|
|
linux_qt6_sonar_task_template: &LINUX_QT6_TASK_SONAR_TEMPLATE
|
|
|
|
install_script:
|
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL -y qt6-base-dev qt6-l10n-tools libqt6svg6-dev qt6-base-dev-tools qmake6 libxerces-c-dev poppler-utils libgl1-mesa-dev"
|
|
|
|
build_script:
|
|
|
|
- uname -a
|
|
|
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
|
|
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
|
|
|
- sleep 1
|
2024-02-16 17:31:08 +01:00
|
|
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
2024-02-05 13:46:30 +01:00
|
|
|
- echo $PATH
|
|
|
|
- which qmake6
|
|
|
|
- which qbs
|
|
|
|
- pwd
|
|
|
|
- ls -l /usr/bin/ | grep -E "${COMPILER_REGEX}"
|
|
|
|
- ${COMPILER} --version
|
|
|
|
- qmake6 --version
|
|
|
|
- qbs --version
|
|
|
|
- qbs setup-toolchains /usr/bin/${COMPILER} ${COMPILER}
|
|
|
|
- qbs setup-qt /usr/bin/qmake6 qt6
|
|
|
|
- qbs config profiles.qt6.baseProfile ${COMPILER}
|
|
|
|
- qbs config defaultProfile qt6
|
2024-02-16 17:04:39 +01:00
|
|
|
- build-wrapper-linux-x86-64 --out-dir ${CIRRUS_WORKING_DIR}/bw-output qbs build --no-install -f valentina.qbs -d ${CIRRUS_WORKING_DIR}/build --jobs $(nproc) profile:qt6 config:debug modules.buildconfig.enableCcache:true modules.cpp.linkerVariant:mold modules.buildconfig.enableTestCoverage:true modules.buildconfig.enablePCH:false
|
2024-02-16 15:39:07 +01:00
|
|
|
# Execute the tests to generate the coverage statistics
|
|
|
|
- qbs -p autotest-runner -d build profile:qt6 config:debug
|
|
|
|
# Run gcov to translate `.gcda` files into `.gcov` readable by humans and SonarCloud
|
|
|
|
- mkdir ${CIRRUS_WORKING_DIR}/build/coverage-dir
|
|
|
|
- cd ${CIRRUS_WORKING_DIR}/build/coverage-dir
|
|
|
|
# --preserve-paths helps us avoid name clash for `.gcov` files corresponding to source files
|
|
|
|
# with the same name but in different directories.
|
2024-03-22 09:28:35 +01:00
|
|
|
- find .. -name '*.o' -exec gcov --preserve-paths {} \;
|
2024-02-16 15:39:07 +01:00
|
|
|
- cd $CIRRUS_WORKING_DIR
|
|
|
|
- sonar-scanner -Dsonar.scm.revision=${CIRRUS_CHANGE_IN_REPO} -Dsonar.links.ci=https://cirrus-ci.com/task/${CIRRUS_TASK_ID} -Dsonar.branch.name=${CIRRUS_BRANCH} -Dsonar.cfamily.gcov.reportsPath="${CIRRUS_WORKING_DIR}/build/coverage-dir"
|
2024-02-16 17:31:08 +01:00
|
|
|
- ccache -s
|
2023-02-14 11:37:27 +01:00
|
|
|
|
|
|
|
linux_qt5_qmake_task_template: &LINUX_QT5_QMAKE_TASK_TEMPLATE
|
2023-02-14 11:52:33 +01:00
|
|
|
install_script:
|
2024-01-12 18:07:45 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL qtbase5-dev libqt5svg5-dev qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 poppler-utils"
|
2021-09-24 12:08:12 +02:00
|
|
|
build_script:
|
2021-09-23 09:57:27 +02:00
|
|
|
- uname -a
|
2021-09-26 19:11:27 +02:00
|
|
|
- echo $PATH
|
2021-09-23 09:57:27 +02:00
|
|
|
- which qmake
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- pwd
|
2023-02-15 12:05:41 +01:00
|
|
|
- ls -l /usr/bin/ | grep -E "${COMPILER_REGEX}"
|
2023-02-15 15:24:25 +01:00
|
|
|
- ${COMPILER} --version
|
2024-01-12 18:50:37 +01:00
|
|
|
- strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
|
2023-09-13 13:27:32 +02:00
|
|
|
- ccache --set-config max_size="$CCACHE_SIZE"
|
2021-09-23 09:57:27 +02:00
|
|
|
- qmake --version
|
2023-02-15 16:36:41 +01:00
|
|
|
- qmake ../Valentina.pro -r -spec ${QMAKE_SPEC} CONFIG+=noDebugSymbols CONFIG+=checkWarnings
|
2021-09-23 09:57:27 +02:00
|
|
|
- make -j$(nproc)
|
|
|
|
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$CIRRUS_WORKING_DIR/build/src/libs/vpropertyexplorer/bin:$CIRRUS_WORKING_DIR/build/src/libs/qmuparser/bin"
|
|
|
|
- xvfb-run -a make --silent check TESTARGS="-silent"
|
2023-02-16 21:29:45 +01:00
|
|
|
- ccache -s
|
2021-09-23 09:57:27 +02:00
|
|
|
|
2023-02-14 11:37:27 +01:00
|
|
|
linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
2021-09-24 12:08:12 +02:00
|
|
|
install_script:
|
2024-01-11 14:05:48 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL qtbase5-dev libqt5svg5-dev qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 poppler-utils"
|
2021-09-24 12:08:12 +02:00
|
|
|
build_script:
|
2023-02-14 11:37:27 +01:00
|
|
|
- uname -a
|
2023-02-16 20:46:08 +01:00
|
|
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
|
|
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
|
|
|
- sleep 1
|
2023-09-13 13:27:32 +02:00
|
|
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
2023-02-14 11:37:27 +01:00
|
|
|
- echo $PATH
|
2023-02-14 14:42:16 +01:00
|
|
|
- which qmake
|
2023-02-14 11:37:27 +01:00
|
|
|
- which qbs
|
2021-09-23 09:57:27 +02:00
|
|
|
- pwd
|
2023-02-15 12:05:41 +01:00
|
|
|
- ls -l /usr/bin/ | grep -E "${COMPILER_REGEX}"
|
2023-02-15 15:24:25 +01:00
|
|
|
- ${COMPILER} --version
|
2023-02-14 19:01:39 +01:00
|
|
|
- qmake --version
|
2023-02-14 11:37:27 +01:00
|
|
|
- qbs --version
|
2023-02-15 13:35:32 +01:00
|
|
|
- qbs setup-toolchains /usr/bin/${COMPILER} ${COMPILER}
|
2023-02-14 14:42:16 +01:00
|
|
|
- qbs setup-qt /usr/bin/qmake qt5
|
2024-02-05 13:46:30 +01:00
|
|
|
- qbs config defaultProfile qt5
|
2023-02-15 13:35:32 +01:00
|
|
|
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
2024-01-11 15:49:43 +01:00
|
|
|
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} modules.cpp.linkerVariant:mold --force-probe-execution
|
2023-02-16 20:46:08 +01:00
|
|
|
- qbs -p autotest-runner -d build profile:qt5 config:release
|
2023-02-16 21:29:45 +01:00
|
|
|
- ccache -s
|
2023-02-14 11:37:27 +01:00
|
|
|
|
2024-02-13 19:35:06 +01:00
|
|
|
appimage_task_template: &APPIMAGE_TASK_TEMPLATE
|
2024-02-12 16:38:29 +01:00
|
|
|
pip_cache:
|
|
|
|
folder: ${PIP_CACHE_DIR}
|
2024-03-12 15:39:44 +01:00
|
|
|
conan_cache:
|
|
|
|
folder: "~/.conan/data"
|
2024-02-10 14:55:16 +01:00
|
|
|
install_script:
|
2024-03-22 09:51:37 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL qt515base qt515svg qt515tools qt515xmlpatterns qt515translations qt515doc qt515imageformats poppler-utils git xvfb ccache build-essential libgl1-mesa-dev libicu-dev python3-pip cmake"
|
2024-02-12 16:38:29 +01:00
|
|
|
- python3 --version
|
2024-03-21 16:18:10 +01:00
|
|
|
- pip3 install --user --upgrade pip dropbox py7zr 'urllib3<2.0' conan==1.63.0 requests
|
2024-02-10 14:53:02 +01:00
|
|
|
build_script:
|
|
|
|
- uname -a
|
|
|
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
|
|
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
|
|
|
- sleep 1
|
|
|
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
2024-03-12 17:39:55 +01:00
|
|
|
- export PATH="${PATH}:/root/.local/bin"
|
2024-02-10 14:53:02 +01:00
|
|
|
- echo $PATH
|
|
|
|
- which qmake
|
|
|
|
- which qbs
|
|
|
|
- pwd
|
|
|
|
- ls -l /usr/bin/ | grep -E "${COMPILER_REGEX}"
|
|
|
|
- ${COMPILER} --version
|
|
|
|
- qmake --version
|
|
|
|
- qbs --version
|
2024-03-12 15:39:44 +01:00
|
|
|
- conan profile new valentina
|
|
|
|
- conan profile update settings.build_type=Release valentina
|
|
|
|
- conan profile update settings.os=Linux valentina
|
2024-03-22 09:28:35 +01:00
|
|
|
- conan profile update settings.arch=x86_64 valentina
|
2024-03-12 15:39:44 +01:00
|
|
|
- conan profile update settings.compiler=gcc valentina
|
|
|
|
- conan profile update settings.compiler.cppstd=17 valentina
|
|
|
|
- conan profile update settings.compiler.libcxx=libstdc++11 valentina
|
|
|
|
- conan profile update settings.compiler.version=9 valentina
|
2024-02-10 14:53:02 +01:00
|
|
|
- qbs setup-toolchains /usr/bin/${COMPILER} ${COMPILER}
|
|
|
|
- qbs setup-qt /opt/qt515/bin/qmake qt5
|
|
|
|
- qbs config defaultProfile qt5
|
|
|
|
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
2024-03-28 10:21:41 +01:00
|
|
|
- conan install . -s os=Linux --build=missing -o with_crash_reporting=True -pr=valentina
|
2024-03-25 13:00:36 +01:00
|
|
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/AppDir modules.buildconfig.enableAppImage:true modules.buildconfig.enableRPath:false project.conanWithCrashReporting:true project.enableConan:true project.conanProfiles:valentina
|
2024-02-10 14:53:02 +01:00
|
|
|
- qbs -p autotest-runner -d build profile:qt5 config:release
|
2024-03-12 15:39:44 +01:00
|
|
|
- export CRASH_QT_VERSION=$(/opt/qt515/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 $CIRRUS_WORKING_DIR/build/AppDir $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean
|
2024-02-13 19:35:06 +01:00
|
|
|
- appimage-builder --recipe dist/AppImage/AppImageBuilder.yml --appdir $CIRRUS_WORKING_DIR/build/AppDir --skip-test
|
2024-02-10 14:53:02 +01:00
|
|
|
- ccache -s
|
|
|
|
deploy_script:
|
|
|
|
- pwd
|
|
|
|
- $CIRRUS_WORKING_DIR/scripts/appimage-deploy.sh
|
|
|
|
|
2023-02-17 13:49:53 +01:00
|
|
|
linux_task:
|
2023-02-15 10:55:40 +01:00
|
|
|
<< : *REGULER_TASK_TEMPLATE
|
2021-09-24 12:39:43 +02:00
|
|
|
env:
|
2023-02-15 10:55:40 +01:00
|
|
|
DEBIAN_FRONTEND: "noninteractive"
|
|
|
|
PACKAGE_MANAGER_INSTALL: "apt-get -qq update && apt-get install -y"
|
2023-02-16 20:46:08 +01:00
|
|
|
DISPLAY: ":90"
|
|
|
|
XDG_RUNTIME_DIR: "/tmp/runtime-kdeci/"
|
2023-02-15 10:55:40 +01:00
|
|
|
matrix:
|
|
|
|
- container:
|
|
|
|
image: dismine/clang-ubuntu:latest
|
|
|
|
env:
|
2023-02-15 13:35:32 +01:00
|
|
|
COMPILER: clang
|
2023-02-15 16:36:41 +01:00
|
|
|
QMAKE_SPEC: "linux-clang"
|
2023-02-15 12:05:41 +01:00
|
|
|
COMPILER_REGEX: clang
|
2023-02-15 10:55:40 +01:00
|
|
|
matrix:
|
|
|
|
- name: 'latest Clang [Qt5 QMake]'
|
|
|
|
<< : *LINUX_QT5_QMAKE_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
|
|
|
cpu: 2
|
|
|
|
memory: 6G # Set to 6GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2023-02-15 10:55:40 +01:00
|
|
|
- name: 'latest Clang [Qt5 QBS]'
|
|
|
|
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
2024-01-10 13:22:23 +01:00
|
|
|
ENABLE_CCACHE: true
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
|
|
|
cpu: 2
|
|
|
|
memory: 6G # Set to 6GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2023-02-15 10:55:40 +01:00
|
|
|
- name: 'latest Clang [Qt6]'
|
|
|
|
<< : *LINUX_QT6_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt6"
|
2024-01-10 13:22:23 +01:00
|
|
|
ENABLE_CCACHE: true
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
|
|
|
cpu: 8
|
|
|
|
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2023-02-15 10:55:40 +01:00
|
|
|
- container:
|
2024-01-12 18:50:37 +01:00
|
|
|
image: dismine/gcc-ubuntu:13
|
2023-02-15 10:55:40 +01:00
|
|
|
env:
|
|
|
|
COMPILER: gcc
|
2023-02-15 16:36:41 +01:00
|
|
|
QMAKE_SPEC: "linux-g++"
|
2023-02-15 10:55:40 +01:00
|
|
|
GCC_COLORS: 'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
2023-02-15 12:05:41 +01:00
|
|
|
COMPILER_REGEX: "gcc|g\\+\\+"
|
2023-02-15 11:00:04 +01:00
|
|
|
matrix:
|
2024-01-12 18:50:37 +01:00
|
|
|
- name: 'GCC 13 [Qt5 QMake]'
|
2023-02-15 11:00:04 +01:00
|
|
|
<< : *LINUX_QT5_QMAKE_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
|
|
|
cpu: 2
|
|
|
|
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2024-02-10 14:53:02 +01:00
|
|
|
- container:
|
2024-02-13 19:35:06 +01:00
|
|
|
image: dismine/appimage-builder:latest
|
2024-02-10 14:53:02 +01:00
|
|
|
env:
|
|
|
|
COMPILER: gcc
|
|
|
|
QMAKE_SPEC: "linux-g++"
|
|
|
|
GCC_COLORS: 'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
COMPILER_REGEX: "gcc|g\\+\\+"
|
2024-02-12 16:38:29 +01:00
|
|
|
PIP_CACHE_DIR: ${HOME}/.cache/pip
|
2024-02-10 14:53:02 +01:00
|
|
|
matrix:
|
|
|
|
- name: 'AppImage'
|
2024-02-13 19:35:06 +01:00
|
|
|
<< : *APPIMAGE_TASK_TEMPLATE
|
2024-02-10 14:53:02 +01:00
|
|
|
env:
|
|
|
|
ACCESS_TOKEN: ENCRYPTED[81e0b2381ffb628b73f5c94f834010e6631191e0ad03cdd0850d440fb2737a74b68131d842030f010c1bf73ab4cdc1ae]
|
|
|
|
DEPLOY: "true"
|
|
|
|
QT_SELECT: "qt5"
|
|
|
|
ENABLE_CCACHE: true
|
|
|
|
VERSION: "continuous"
|
|
|
|
QT_VERSION: Qt6
|
|
|
|
ARCH: x86_64
|
|
|
|
TARGET_PLATFORM: "Linux"
|
2024-03-12 15:39:44 +01:00
|
|
|
VALENTINA_VERSION: 0_7_52
|
2024-02-10 14:53:02 +01:00
|
|
|
container:
|
|
|
|
cpu: 4
|
|
|
|
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2024-01-12 18:50:37 +01:00
|
|
|
- container:
|
|
|
|
image: dismine/gcc-ubuntu:latest
|
|
|
|
env:
|
|
|
|
COMPILER: gcc
|
|
|
|
QMAKE_SPEC: "linux-g++"
|
|
|
|
GCC_COLORS: 'error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
COMPILER_REGEX: "gcc|g\\+\\+"
|
|
|
|
matrix:
|
2023-02-15 11:00:04 +01:00
|
|
|
- name: 'latest GCC [Qt5 QBS]'
|
|
|
|
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
2023-02-17 18:59:50 +01:00
|
|
|
ENABLE_CCACHE: true
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
|
|
|
cpu: 3
|
|
|
|
memory: 10G # Set to 10GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2023-02-15 15:20:13 +01:00
|
|
|
- name: 'latest GCC [Qt6]'
|
2023-02-15 11:00:04 +01:00
|
|
|
<< : *LINUX_QT6_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt6"
|
2023-02-17 18:59:50 +01:00
|
|
|
ENABLE_CCACHE: true
|
2023-08-28 13:25:59 +02:00
|
|
|
container:
|
2024-01-12 14:34:28 +01:00
|
|
|
cpu: 4
|
|
|
|
memory: 16G # Set to 16GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
2024-02-16 15:39:07 +01:00
|
|
|
- name: 'Sonar, latest GCC [Qt6]'
|
|
|
|
<< : *LINUX_QT6_TASK_SONAR_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt6"
|
|
|
|
SONAR_TOKEN: ENCRYPTED[!715ab983713a5035d505d2c601c9bb78a9475b9a04db62cdda9c674affd58ac956e563ce6d38228b48e05c4dbea2f52d!]
|
|
|
|
container:
|
|
|
|
cpu: 8
|
|
|
|
memory: 10G # Set to 10GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
|
|
|
sonar_cache:
|
|
|
|
folder: "${HOME}/.sonar/cache"
|
2023-02-17 13:49:53 +01:00
|
|
|
|
|
|
|
macos_task_template: &MACOS_TASK_TEMPLATE
|
|
|
|
<< : *REGULER_TASK_TEMPLATE
|
|
|
|
timeout_in: 120m
|
|
|
|
env:
|
|
|
|
ACCESS_TOKEN: ENCRYPTED[81e0b2381ffb628b73f5c94f834010e6631191e0ad03cdd0850d440fb2737a74b68131d842030f010c1bf73ab4cdc1ae]
|
2023-09-13 13:27:14 +02:00
|
|
|
# Should contain the base64 of the certificate
|
|
|
|
MACOS_CERTIFICATE: ENCRYPTED[6600e8c131eaa3ca1d8e4d61a266bfbbf072d557ba89d34e5fb044f8d07af857ea163543824a4a664636a50c1d6d9456]
|
|
|
|
# Should contain the full certificate name, such as Developer ID Application: Your Name (K1234567)
|
|
|
|
MACOS_CERTIFICATE_NAME: ENCRYPTED[9b9e4b0b596a19690a97abfaa8ec90176d8c9567c0c807757ee5dda02672a7426cd25fea3bb7652958abc970912b2138]
|
|
|
|
# Should contain the password you chose when exported the certificate from the Keychain Access app
|
|
|
|
MACOS_CERTIFICATE_PWD: ENCRYPTED[ad78a1c7b5b17ef56c833664cd6a71563b7ea4157ad2daa8e89d88988bdc3f7a669b9d2ee3e47b911707c37f6d84153e]
|
|
|
|
# Should contain apple developer email, the same used the Apple Developer subscription
|
|
|
|
MACOS_NOTARIZATION_APPLE_ID: ENCRYPTED[38dc4848b24abb90c25a0a1156de39af8c88aea6267e934e59cc5fb17dc528e3c1a93d8a9695fe937f4894d10eac707e]
|
|
|
|
# Should contain the app-specific password
|
|
|
|
MACOS_NOTARIZATION_PWD: ENCRYPTED[1df7f3455fb6837adf9ccf2913b5609c0a5125dca3147ece0a51001cf322234c5382977f28a783222f974525a1794cf4]
|
|
|
|
# Should contain the Team ID
|
|
|
|
MACOS_NOTARIZATION_TEAM_ID: ENCRYPTED[8499d687ffd7f6eacda48bd3692bfb22ea6a25eb4a59637b9ff10caa3c8a2df681a790e99b976e7a419d8e5fad2ad35c]
|
|
|
|
# Should contain a strong, randomly generated password
|
|
|
|
MACOS_CI_KEYCHAIN_PWD: ENCRYPTED[7f08698aea44fb7c900267c439c1dfe54e218082e5d6b2354cecc00e21bc640058a55036fd027a1fb5a3d72356abb9ea]
|
2023-02-17 15:50:46 +01:00
|
|
|
QTDIR: "/opt/homebrew/opt/qt6"
|
2023-02-25 19:44:39 +01:00
|
|
|
PATH: $QTDIR/bin:${PATH}
|
2023-02-17 13:49:53 +01:00
|
|
|
# ^ add user paths
|
|
|
|
PIP_CACHE_DIR: ${HOME}/.cache/pip
|
|
|
|
LDFLAGS: "-L$QTDIR/lib"
|
|
|
|
CPPFLAGS: "-I$QTDIR/include"
|
2024-01-11 16:04:13 +01:00
|
|
|
HOMEBREW_NO_AUTO_UPDATE: ""
|
2023-02-17 13:49:53 +01:00
|
|
|
local_homebrew_cache:
|
|
|
|
folder: "$HOME/Library/Caches/Homebrew"
|
2023-02-20 14:42:50 +01:00
|
|
|
global_conan_cache:
|
|
|
|
folder: "$HOME/Library/Caches/Conan"
|
|
|
|
local_conan_cache:
|
|
|
|
folder: "~/.conan/data"
|
2023-02-17 13:49:53 +01:00
|
|
|
pip_cache:
|
|
|
|
folder: ${PIP_CACHE_DIR}
|
|
|
|
install_script:
|
2023-02-24 20:32:45 +01:00
|
|
|
- clang --version
|
|
|
|
- find /Applications -maxdepth 1 -type d -name 'Xcode*.app'
|
|
|
|
- sudo xcode-select -p
|
2024-03-26 10:29:51 +01:00
|
|
|
- xcrun --show-sdk-path -sdk macosx
|
2023-09-13 13:27:14 +02:00
|
|
|
# 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)
|
2023-09-14 19:36:54 +02:00
|
|
|
- security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
|
2023-09-13 13:27:14 +02:00
|
|
|
# Make the custom keychain default, so xcodebuild will use it for signing
|
2023-09-14 19:36:54 +02:00
|
|
|
- security default-keychain -s $HOME/Library/Keychains/build.keychain
|
2023-09-13 13:27:14 +02:00
|
|
|
# Unlock the keychain
|
2023-09-14 19:36:54 +02:00
|
|
|
- security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
|
2023-09-14 20:21:12 +02:00
|
|
|
- security set-keychain-settings $HOME/Library/Keychains/build.keychain
|
2023-09-14 13:49:18 +02:00
|
|
|
# Check if System.keychain is not cluttered
|
|
|
|
# good: 60K
|
|
|
|
# bad: 25MB
|
|
|
|
- du -h /Library/Keychains/System.keychain
|
2023-09-13 13:27:14 +02:00
|
|
|
# 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
|
2024-03-21 16:23:25 +01:00
|
|
|
- sudo security import $HOME/AppleWWDRCAG3.cer -k /Library/Keychains/System.keychain -T /usr/bin/codesign || true
|
2023-09-13 13:27:14 +02:00
|
|
|
# 2) Developer Authentication Certification Authority
|
|
|
|
- curl https://www.apple.com/certificateauthority/DeveloperIDG2CA.cer --output $HOME/DeveloperIDG2CA.cer --silent
|
2024-03-12 16:02:38 +01:00
|
|
|
- sudo security import $HOME/DeveloperIDG2CA.cer -k /Library/Keychains/System.keychain -T /usr/bin/codesign || true
|
2023-09-13 13:27:14 +02:00
|
|
|
# 3) Developer ID
|
2023-09-14 19:36:54 +02:00
|
|
|
- security import certificate.p12 -k $HOME/Library/Keychains/build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
|
2023-09-13 13:27:14 +02:00
|
|
|
# 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)
|
2023-09-14 19:36:54 +02:00
|
|
|
- security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k "$MACOS_CI_KEYCHAIN_PWD" $HOME/Library/Keychains/build.keychain
|
2023-09-13 13:27:14 +02:00
|
|
|
# Echo the identity, just so that we know it worked.
|
|
|
|
# This won't display anything secret.
|
|
|
|
- security find-identity -v -p codesigning
|
2023-02-17 13:49:53 +01:00
|
|
|
- brew update > /dev/null
|
2024-03-25 14:56:16 +01:00
|
|
|
- brew install qt6 coreutils ccache qbs cmake ninja git openssl@1.1 pkg-config poppler xerces-c
|
2024-01-09 14:45:47 +01:00
|
|
|
- brew outdated
|
2024-03-25 13:00:36 +01:00
|
|
|
- brew upgrade qt6
|
2023-02-25 22:49:58 +01:00
|
|
|
- echo $PATH
|
|
|
|
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
|
|
|
- echo $PATH
|
2023-02-17 13:49:53 +01:00
|
|
|
- python3 --version
|
2024-03-26 10:57:33 +01:00
|
|
|
- pip3 install --break-system-packages --user --upgrade pip dropbox py7zr 'urllib3<2.0' conan==1.63.0 requests setuptools
|
2023-09-13 13:27:32 +02:00
|
|
|
- ccache --set-config sloppiness=pch_defines,time_macros max_size="$CCACHE_SIZE"
|
2024-03-25 13:00:36 +01:00
|
|
|
- qmake --version
|
|
|
|
- which qmake
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs --version
|
|
|
|
build_script:
|
2023-02-25 19:44:39 +01:00
|
|
|
- echo $PATH
|
2024-03-26 19:34:45 +01:00
|
|
|
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$HOME/.cargo/bin:$PATH"
|
2023-02-25 19:15:41 +01:00
|
|
|
- echo $PATH
|
2023-09-14 14:16:11 +02:00
|
|
|
- whereis python3
|
2024-03-25 17:26:05 +01:00
|
|
|
- sudo mkdir /usr/local/bin
|
|
|
|
- sudo ln -s -f /usr/bin/python3 /usr/local/bin/python
|
2023-09-14 14:34:18 +02:00
|
|
|
- sudo ln -s /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/usr/bin/python
|
2023-09-14 14:16:11 +02:00
|
|
|
- whereis python
|
2023-02-17 13:49:53 +01:00
|
|
|
- pwd
|
2023-09-21 17:20:22 +02:00
|
|
|
- curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
|
2023-09-22 10:25:00 +02:00
|
|
|
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}
|
2023-09-21 18:00:45 +02:00
|
|
|
- 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
|
2023-09-22 10:32:47 +02:00
|
|
|
- cmake --build ${HOME}/macdeployqt-build-dir --target install
|
2024-03-12 15:39:44 +01:00
|
|
|
- conan profile new valentina
|
|
|
|
- conan profile update settings.build_type=Release valentina
|
|
|
|
- conan profile update settings.os=Macos valentina
|
2024-03-28 10:21:41 +01:00
|
|
|
- conan profile update settings.os_build=Macos valentina
|
2024-03-25 17:36:41 +01:00
|
|
|
- conan profile update settings.arch=armv8 valentina
|
2024-03-28 10:21:41 +01:00
|
|
|
- conan profile update settings.arch_build=armv8 valentina
|
2024-03-26 10:29:51 +01:00
|
|
|
- conan profile update settings.compiler=apple-clang valentina
|
2024-03-12 15:39:44 +01:00
|
|
|
- conan profile update settings.compiler.cppstd=17 valentina
|
2024-03-26 10:29:51 +01:00
|
|
|
- conan profile update settings.compiler.libcxx=libc++ valentina
|
2024-03-25 17:38:46 +01:00
|
|
|
- conan profile update settings.compiler.version=15 valentina
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs setup-toolchains --detect
|
|
|
|
- qbs config --list profiles
|
2024-03-25 13:00:36 +01:00
|
|
|
- qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6
|
2024-02-05 13:46:30 +01:00
|
|
|
- qbs config defaultProfile qt6
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs config profiles.qt6.baseProfile clang
|
2024-03-21 17:05:22 +01:00
|
|
|
- conan install . -s os=Macos --build=missing -o with_crash_reporting=True -pr=valentina
|
2024-03-28 10:21:41 +01:00
|
|
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} 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 project.conanProfiles:valentina
|
2024-03-25 13:00:36 +01:00
|
|
|
- export CRASH_QT_VERSION=$(/opt/homebrew/opt/qt6/bin/qmake -query QT_VERSION | awk -F. '{print $1 "_" $2}')
|
2024-03-12 15:39:44 +01:00
|
|
|
- export CRASH_SHORT_SHA=$(git log --pretty=format:%h -n 1)
|
2024-03-25 13:14:59 +01:00
|
|
|
- curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mozilla/dump_syms/releases/download/v2.3.1/dump_syms-installer.sh | sh
|
2024-03-28 14:03:35 +01:00
|
|
|
- sudo python3 scripts/symupload.py $CIRRUS_WORKING_DIR/build/install-root $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --multibundle=$MULTI_BUNDLE --clean
|
2024-03-28 10:21:41 +01:00
|
|
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE} 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 project.conanProfiles:valentina
|
2023-09-13 13:27:14 +02:00
|
|
|
# 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"
|
2023-09-26 19:19:12 +02:00
|
|
|
- xcrun notarytool submit "$CIRRUS_WORKING_DIR/build/install-root/share/valentina.dmg" --keychain-profile "notarytool-profile" --wait --timeout 5m || true
|
2023-09-13 13:27:14 +02:00
|
|
|
# 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 $CIRRUS_WORKING_DIR/build/install-root/share/valentina.dmg || true
|
2023-02-17 13:49:53 +01:00
|
|
|
- ccache -s
|
|
|
|
deploy_script:
|
|
|
|
- pwd
|
|
|
|
- $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh
|
|
|
|
before_cache_script:
|
|
|
|
- brew cleanup
|
|
|
|
|
|
|
|
macos_task:
|
|
|
|
macos_instance:
|
2024-03-12 16:02:38 +01:00
|
|
|
image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
|
2023-02-17 13:49:53 +01:00
|
|
|
<< : *MACOS_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
DEPLOY: "true"
|
2023-02-22 15:45:53 +01:00
|
|
|
QT_VERSION: Qt6
|
2023-06-30 10:57:11 +02:00
|
|
|
ARCH: armv8
|
2024-01-27 18:02:55 +01:00
|
|
|
TARGET_PLATFORM: "macOS_12.4+"
|
2023-06-30 09:07:18 +02:00
|
|
|
MACOS_DEPLOYMENT_TARGET: 12.0
|
2024-01-10 13:22:23 +01:00
|
|
|
ENABLE_CCACHE: true
|
2024-03-12 15:39:44 +01:00
|
|
|
VALENTINA_VERSION: 0_7_52
|
2023-02-17 13:49:53 +01:00
|
|
|
matrix:
|
|
|
|
- name: 'macOS Monterey 12 [signle bundle, no tests]'
|
|
|
|
env:
|
2023-02-20 21:03:39 +01:00
|
|
|
MULTI_BUNDLE: false
|
2023-02-17 13:49:53 +01:00
|
|
|
- name: 'macOS Monterey 12 [multi bundle, no tests]'
|
|
|
|
env:
|
2023-02-20 21:03:39 +01:00
|
|
|
MULTI_BUNDLE: true
|