Files
neochat/.gitlab-ci.yml
2019-08-18 10:40:13 +00:00

59 lines
1.8 KiB
YAML

stages:
- build
- deploy
build-flatpak:
image: registry.gitlab.com/b0/flatpak-kde-docker
stage: build
before_script:
- git submodule update --init --recursive
script:
- cd flatpak
- flatpak-builder --force-clean --ccache --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-$(git rev-list --count HEAD).flatpak
cache:
key: "flatpak-$CI_COMMIT_REF_SLUG"
paths:
- flatpak/.flatpak-builder
artifacts:
paths:
- "*.flatpak"
build-osx:
stage: build
tags:
- osx
script:
- pushd include/libQuotient/3rdparty/libQtOlm
- git clone https://gitlab.matrix.org/matrix-org/olm.git
- popd
- mkdir build && pushd build
- cmake .. -LA -DUSE_INTREE_LIBQMC=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr
- cmake --build . --target all
- popd
- macdeployqt build/spectral.app -dmg -qmldir=qml -qmldir=imports
- mv build/spectral.dmg ./spectral-$(git rev-list --count HEAD).dmg
artifacts:
paths:
- "*.dmg"
deploy-flatpak:
image: python:3-alpine
stage: deploy
only:
- master
before_script:
- pip3 install awscli
- pip3 install awscli-plugin-endpoint
- cp -R ci/.aws ~/
- sed -i -e "s~REGION~$REGION~g" ~/.aws/config
- sed -i -e "s~ENDPOINT_URL~$ENDPOINT_URL~g" ~/.aws/config
- sed -i -e "s~AWS_ACCESS_KEY_ID~$AWS_ACCESS_KEY_ID~g" ~/.aws/credentials
- sed -i -e "s~AWS_SECRET_ACCESS_KEY~$AWS_SECRET_ACCESS_KEY~g" ~/.aws/credentials
script:
- aws s3 cp *.flatpak s3://$BUCKET_NAME/spectral/flatpak/artifacts/ --acl public-read
- aws s3 rm s3://$BUCKET_NAME/spectral/flatpak/spectral.flatpak
- aws s3 cp *.flatpak s3://$BUCKET_NAME/spectral/flatpak/spectral.flatpak --acl public-read