matrixion/.gitlab-ci.yml

234 lines
9.3 KiB
YAML
Raw Normal View History

2020-05-01 02:27:27 +03:00
variables:
CCACHE_COMPILERCHECK: content
CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
# prevent configure tzdata hanging apt install commands
DEBIAN_FRONTEND: noninteractive
2021-12-29 01:34:21 +03:00
build-clazy:
stage: build
2022-07-23 13:34:40 +03:00
image: ubuntu:22.04
2021-12-29 01:34:21 +03:00
tags: [docker]
variables:
CLAZY_CHECKS: level0,level1,no-non-pod-global-static
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
2022-07-23 14:10:25 +03:00
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake liblmdb-dev
2021-12-29 01:34:21 +03:00
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
2022-05-14 03:22:33 +03:00
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
2021-12-29 01:34:21 +03:00
script:
- export PATH="/usr/local/bin/:/usr/lib/ccache:${PATH}"
- export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l)
- cmake -GNinja -H. -Bbuild
-DCMAKE_INSTALL_PREFIX=.deps/usr
2022-05-14 03:22:33 +03:00
-DHUNTER_ENABLED=OFF -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_MTXCLIENT=ON -DUSE_BUNDLED_COEURL=ON -DUSE_BUNDLED_LMDBXX=ON -DUSE_BUNDLED_OLM=ON
2021-12-29 01:34:21 +03:00
-DVOIP=OFF
-DCMAKE_BUILD_TYPE=Release
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF -DCMAKE_CXX_COMPILER=clazy
2021-12-29 01:34:21 +03:00
- cmake --build build
cache:
key: "$CI_JOB_NAME"
paths:
- .ccache
2022-09-22 19:42:11 +03:00
build-gcc11:
2020-05-01 02:27:27 +03:00
stage: build
2022-09-22 19:42:11 +03:00
image: ubuntu:22.04
2020-05-01 02:27:27 +03:00
tags: [docker]
variables:
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
2022-09-22 19:42:11 +03:00
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
2020-05-01 02:27:27 +03:00
# need recommended deps for wget
- apt-get -y install wget
- /usr/sbin/update-ccache-symlinks
2021-06-30 13:45:41 +03:00
- rm -rf ../.hunter && mv .hunter ../.hunter || true
2020-05-01 02:27:27 +03:00
script:
2022-09-22 19:42:11 +03:00
- export PATH="/usr/lib/ccache:${PATH}"
- cmake -GNinja -H. -Bbuild
-DCMAKE_INSTALL_PREFIX=.deps/usr
-DHUNTER_ROOT="../.hunter"
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF -DUSE_BUNDLED_QTKEYCHAIN=OFF
-DVOIP=OFF
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
-DJSON_ImplicitConversions=OFF
- cmake --build build
after_script:
- mv ../.hunter .hunter
cache:
key: "$CI_JOB_NAME"
paths:
- .hunter/
- .ccache
build-gcc10:
stage: build
image: debian:bullseye
tags: [docker]
variables:
TRAVIS_OS_NAME: linux
before_script:
- apt-get update
- apt-get -y install --no-install-suggests --no-install-recommends ca-certificates build-essential ninja-build cmake gcc make automake ccache liblmdb-dev
libssl-dev libqt5multimedia5-plugins libqt5multimediagsttools5 libqt5multimediaquick5 libqt5svg5-dev
qtmultimedia5-dev qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools qtdeclarative5-dev
qml-module-qtmultimedia qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qt-labs-platform
qt5keychain-dev ccache clazy libcurl4-openssl-dev libevent-dev libspdlog-dev git nlohmann-json3-dev libcmark-dev asciidoc # libolm-dev
# need recommended deps for wget
- apt-get -y install wget
- /usr/sbin/update-ccache-symlinks
- rm -rf ../.hunter && mv .hunter ../.hunter || true
script:
- export PATH="/usr/lib/ccache:${PATH}"
2020-05-01 02:27:27 +03:00
- cmake -GNinja -H. -Bbuild
-DCMAKE_INSTALL_PREFIX=.deps/usr
2021-06-30 13:45:41 +03:00
-DHUNTER_ROOT="../.hunter"
2022-09-22 19:42:11 +03:00
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF -DUSE_BUNDLED_QTKEYCHAIN=OFF
-DVOIP=OFF
2020-05-01 02:27:27 +03:00
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
2021-11-18 05:28:26 +03:00
-DCI_BUILD=ON -DFETCHCONTENT_QUIET=OFF
-DJSON_ImplicitConversions=OFF
2020-05-01 02:27:27 +03:00
- cmake --build build
2021-06-30 13:45:41 +03:00
after_script:
- mv ../.hunter .hunter
2020-05-01 02:27:27 +03:00
cache:
key: "$CI_JOB_NAME"
paths:
- .hunter/
- .ccache
build-macos:
stage: build
tags: [macos]
before_script:
2021-06-30 13:45:41 +03:00
- rm -rf ../.hunter && mv .hunter ../.hunter || true
2020-05-01 02:27:27 +03:00
script:
2021-08-06 05:22:47 +03:00
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5
2020-05-01 02:27:27 +03:00
- cmake -GNinja -H. -Bbuild
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=.deps/usr
2021-06-30 13:45:41 +03:00
-DHUNTER_ROOT="../.hunter"
2020-05-01 02:27:27 +03:00
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo
-DUSE_BUNDLED_OPENSSL=ON
-DUSE_BUNDLED_BOOST=ON
-DCI_BUILD=ON
2022-09-22 19:08:12 +03:00
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
2020-05-01 02:27:27 +03:00
- cmake --build build
- (cd build && git clone https://github.com/Nheko-Reborn/qt-jdenticon.git && cd qt-jdenticon && qmake && make -j 4 && cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS)
2020-12-08 23:34:07 +03:00
after_script:
2021-06-30 13:45:41 +03:00
- mv ../.hunter .hunter
2020-12-08 23:34:07 +03:00
artifacts:
paths:
2021-09-03 21:53:31 +03:00
- build/nheko.app
2022-09-25 00:43:06 +03:00
- /tmp/notarize*
2021-09-03 21:53:31 +03:00
name: nheko-${CI_COMMIT_SHORT_SHA}-macos-app
expose_as: 'macos-app'
public: false
2020-05-01 02:27:27 +03:00
cache:
key: "${CI_JOB_NAME}"
paths:
- .hunter/
- "${CCACHE_DIR}"
2021-09-03 21:53:31 +03:00
codesign-macos:
stage: deploy
tags: [macos]
before_script:
2022-03-23 05:07:38 +03:00
- 'brew upgrade qt@5'
2021-09-03 21:53:31 +03:00
- pip3 install dmgbuild
script:
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
- ./.ci/macos/notarize.sh
after_script:
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
needs:
- build-macos
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if : $CI_COMMIT_TAG
artifacts:
paths:
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
name: nheko-${CI_COMMIT_SHORT_SHA}-macos
expose_as: 'macos-dmg'
2020-05-01 02:27:27 +03:00
build-flatpak-amd64:
stage: build
image: ubuntu:latest
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
tags: [docker]
before_script:
2022-04-23 02:08:23 +03:00
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
2020-05-01 02:27:27 +03:00
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2022-09-12 23:05:25 +03:00
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15-22.08
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
2020-05-01 02:27:27 +03:00
script:
- export VERSION=$(git describe)
- mkdir -p build-flatpak
- cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date`" app ../io.github.NhekoReborn.Nheko.yaml
2021-01-11 01:45:10 +03:00
- flatpak build-bundle repo nheko-amd64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
2020-05-01 02:27:27 +03:00
after_script:
2021-02-23 21:26:26 +03:00
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
2020-05-01 02:27:27 +03:00
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-amd64.flatpak
cache:
key: "$CI_JOB_NAME"
paths:
- build-flatpak/.flatpak-builder/
artifacts:
expose_as: 'flatpak-amd64'
paths: ['build-flatpak/nheko-amd64.flatpak']
name: flatpak-${CI_COMMIT_REF_NAME}-${VERSION}-amd64
build-flatpak-arm64:
stage: build
image: ubuntu:latest
#image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
tags: [docker-arm64]
before_script:
2022-04-23 02:08:23 +03:00
- apt-get update && apt-get -y install flatpak-builder git python3 curl python3-aiohttp python3-tenacity gir1.2-ostree-1.0
2020-05-01 02:27:27 +03:00
- flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
2022-09-12 23:05:25 +03:00
- flatpak --noninteractive install --user flathub org.kde.Platform//5.15-22.08
- flatpak --noninteractive install --user flathub org.kde.Sdk//5.15-22.08
2020-05-01 02:27:27 +03:00
script:
- export VERSION=$(git describe)
- mkdir -p build-flatpak
- cd build-flatpak
- flatpak-builder --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for arm64" app ../io.github.NhekoReborn.Nheko.yaml
2021-01-11 01:45:10 +03:00
- flatpak build-bundle repo nheko-arm64.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_}
2020-05-01 02:27:27 +03:00
after_script:
2021-02-23 21:26:26 +03:00
- (cd ./scripts && ./upload-to-flatpak-repo.sh ../build-flatpak/repo) || true
2020-05-01 02:27:27 +03:00
- bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-arm64.flatpak
cache:
key: "$CI_JOB_NAME"
paths:
- build-flatpak/.flatpak-builder/
artifacts:
expose_as: 'flatpak-arm64'
paths: ['build-flatpak/nheko-arm64.flatpak']
name: flatpak-${CI_COMMIT_REF_NAME}-${VERSION}-arm64
linting:
stage: build
image: alpine:latest
tags: [docker]
before_script:
2021-06-16 02:23:28 +03:00
- apk update && apk add clang-extra-tools make git python3 py3-pip
2021-03-05 02:35:15 +03:00
- export PATH="$PATH:/root/.local/bin"
- pip3 install --user reuse
2020-05-01 02:27:27 +03:00
script:
- make lint
2021-03-05 02:35:15 +03:00
- make license
2020-12-25 21:14:32 +03:00