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 - 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_static.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.13.2/ -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.13.2/ -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.13.2/ -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.13.2/bin/macdeployqt build/spectral.app -dmg -qmldir=qml -qmldir=imports - mv build/spectral.dmg ./spectral.dmg artifacts: paths: - spectral.dmg