1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
stages:
- build
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
build-appimage:
image: registry.gitlab.com/spectral-im/qt-docker:latest
stage: build
script:
- git clone https://gitlab.matrix.org/matrix-org/olm.git && cd olm
- cmake . -Bbuild -LA -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=NO
- cmake --build build --target install --parallel $(nproc)
- cd ..
- git clone https://github.com/frankosterfeld/qtkeychain.git && cd qtkeychain
- cmake . -Bbuild -LA -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DQTKEYCHAIN_STATIC=ON -DBUILD_TRANSLATIONS=NO
- cmake --build build --parallel $(nproc)
- sudo cmake --build build --target install
- cd ..
- git clone https://github.com/commonmark/cmark.git && cd cmark
- git reset --hard tags/0.29.0
- cmake . -Bbuild -LA -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DCMARK_SHARED=ON -DCMARK_STATIC=ON -DCMARK_TESTS=OFF
- cmake --build build --target install --parallel $(nproc)
- cd ..
- cmake . -Bbuild -LA -DUSE_INTREE_LIBQMC=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install/usr -DOlm_DIR="olm/install/lib/cmake/Olm" -DQt5Keychain_DIR="qtkeychain/install/lib/x86_64-linux-gnu/cmake/Qt5Keychain" -DCMARK_LIBRARY="$PWD/cmark/install/lib/libcmark.a" -DCMARK_INCLUDE_DIR="$PWD/cmark/install/include"
- cmake --build build --target install --parallel $(nproc)
- cp install/usr/share/icons/hicolor/256x256/apps/org.eu.encom.spectral.png install/org.eu.encom.spectral.png
- linuxdeployqt install/usr/share/applications/org.eu.encom.spectral.desktop -appimage -qmldir=qml -qmldir=imports
- mv *.AppImage spectral.AppImage
artifacts:
paths:
- spectral.AppImage
build-flatpak:
image: registry.gitlab.com/spectral-im/flatpak-kde-docker:latest
stage: build
script:
- cd flatpak
- flatpak-builder --force-clean --repo=repo build-dir org.eu.encom.spectral.yaml
- flatpak build-bundle repo spectral.flatpak org.eu.encom.spectral
- cd ../
- mv flatpak/spectral.flatpak ./spectral.flatpak
artifacts:
paths:
- spectral.flatpak
build-osx:
stage: build
tags:
- osx
script:
- brew install cmark
- rm -rf olm
- git clone https://gitlab.matrix.org/matrix-org/olm.git
- pushd olm
- cmake . -Bbuild -LA -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.14.0/ -DBUILD_SHARED_LIBS=NO
- cmake --build build --target install --parallel $(sysctl -n hw.ncpu)
- popd
- rm -rf qtkeychain
- git clone https://github.com/frankosterfeld/qtkeychain.git
- pushd qtkeychain
- cmake . -Bbuild -LA -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.14.0/ -DQTKEYCHAIN_STATIC=ON
- cmake --build build --target install --parallel $(sysctl -n hw.ncpu)
- popd
- cmake . -Bbuild -LA -DUSE_INTREE_LIBQMC=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.14.0/ -DOlm_DIR="olm/install/lib/cmake/Olm" -DQt5Keychain_DIR="qtkeychain/install/lib/cmake/Qt5Keychain"
- cmake --build build --target all --parallel $(sysctl -n hw.ncpu)
- /usr/local/Cellar/qt/5.14.0/bin/macdeployqt build/spectral.app -dmg -qmldir=qml -qmldir=imports
- mv build/spectral.dmg ./spectral.dmg
artifacts:
paths:
- spectral.dmg
|