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:
|
2023-02-15 15:20:13 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL -y qbs qt6-base-dev qt6-l10n-tools libqt6svg6-dev qt6-base-dev-tools qmake6 qbs 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-02-17 17:57:00 +01:00
|
|
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
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}
|
2023-02-14 18:49:03 +01:00
|
|
|
- qbs-config defaultProfile qt6
|
2023-05-12 19:21:29 +02:00
|
|
|
- qbs build -f valentina.qbs -d build --command-echo-mode command-line --jobs $(nproc) profile:qt6 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
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
|
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:
|
2023-02-15 15:20:13 +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
|
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:
|
2023-02-15 15:20:13 +01:00
|
|
|
- bash -c "$PACKAGE_MANAGER_INSTALL qbs 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-02-17 17:57:00 +01:00
|
|
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
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
|
2023-02-14 18:30:45 +01:00
|
|
|
- qbs-config defaultProfile qt5
|
2023-02-15 13:35:32 +01:00
|
|
|
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
2023-05-12 19:21:29 +02:00
|
|
|
- qbs build -f valentina.qbs -d build --command-echo-mode command-line --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
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
|
|
|
|
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-14 11:37:27 +01:00
|
|
|
container:
|
2023-02-15 10:55:40 +01:00
|
|
|
cpu: 4
|
|
|
|
matrix:
|
|
|
|
- container:
|
|
|
|
image: dismine/clang-ubuntu:latest
|
|
|
|
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
|
|
|
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"
|
|
|
|
- name: 'latest Clang [Qt5 QBS]'
|
|
|
|
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
2023-02-17 18:59:50 +01:00
|
|
|
ENABLE_CCACHE: false
|
2023-02-15 10:55:40 +01:00
|
|
|
- name: 'latest Clang [Qt6]'
|
|
|
|
<< : *LINUX_QT6_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt6"
|
2023-02-17 18:59:50 +01:00
|
|
|
ENABLE_CCACHE: false
|
2023-02-15 10:55:40 +01:00
|
|
|
- container:
|
2023-02-15 15:20:13 +01:00
|
|
|
image: dismine/gcc-ubuntu:latest
|
2023-02-15 10:55:40 +01:00
|
|
|
memory: 16G # Set to 16GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
|
|
|
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:
|
|
|
|
- name: 'latest GCC [Qt5 QMake]'
|
|
|
|
<< : *LINUX_QT5_QMAKE_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
QT_SELECT: "qt5"
|
|
|
|
- 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-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-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-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"
|
2023-02-17 15:50:46 +01:00
|
|
|
PKG_CONFIG_PATH: "/opt/homebrew/opt/qt6/lib/pkgconfig"
|
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
|
2023-02-17 13:49:53 +01:00
|
|
|
- brew update > /dev/null
|
2023-06-13 09:21:08 +02:00
|
|
|
- brew install --force qt6 coreutils ccache qbs cmake git
|
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 15:50:46 +01:00
|
|
|
- chmod -R 755 /opt/homebrew/opt/qt6/*
|
2023-02-17 13:49:53 +01:00
|
|
|
- python3 --version
|
2023-02-25 16:22:45 +01:00
|
|
|
- pip3 install --user --upgrade pip dropbox conan==1.59
|
2023-02-22 15:45:53 +01:00
|
|
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
2023-02-20 14:57:54 +01:00
|
|
|
- conan --version
|
2023-02-17 13:49:53 +01:00
|
|
|
- qmake --version
|
2023-02-17 17:33:10 +01:00
|
|
|
- which qmake
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs --version
|
|
|
|
build_script:
|
2023-02-25 19:44:39 +01:00
|
|
|
- echo $PATH
|
|
|
|
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
2023-02-25 19:15:41 +01:00
|
|
|
- echo $PATH
|
2023-02-17 13:49:53 +01:00
|
|
|
- pwd
|
2023-03-06 15:34:39 +01:00
|
|
|
- conan install . -s os=Macos -s os.version=${MACOS_DEPLOYMENT_TARGET} --build=missing
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs setup-toolchains --detect
|
|
|
|
- qbs config --list profiles
|
2023-02-17 15:50:46 +01:00
|
|
|
- qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6
|
2023-02-17 13:49:53 +01:00
|
|
|
- qbs-config defaultProfile qt6
|
|
|
|
- qbs config profiles.qt6.baseProfile clang
|
2023-05-12 19:21:29 +02:00
|
|
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
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:
|
|
|
|
image: ghcr.io/cirruslabs/macos-monterey-xcode:13.4.1
|
|
|
|
<< : *MACOS_TASK_TEMPLATE
|
|
|
|
env:
|
|
|
|
DEPLOY: "true"
|
2023-02-22 15:45:53 +01:00
|
|
|
QT_VERSION: Qt6
|
|
|
|
ARCH: arm64
|
2023-02-17 13:49:53 +01:00
|
|
|
PLATFORM: "macOS_11+"
|
2023-02-20 19:14:13 +01:00
|
|
|
MACOS_DEPLOYMENT_TARGET: 11.0
|
2023-02-21 09:33:58 +01:00
|
|
|
ENABLE_CCACHE: false
|
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
|