atrooney-online-2/.gitlab-ci.yml
2019-01-21 03:06:30 +00:00

69 lines
1.4 KiB
YAML

image: rabits/qt:5.9-desktop
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- lib/
before_script:
- echo Current working directory is $(pwd)
- qmake --version
- gcc --version
- sudo apt-get install --no-install-recommends -y upx zip unzip
- cd scripts
- ./configure_ubuntu.sh
- cd ..
build linux x86_64:
stage: build
tags:
- docker
- linux
script:
- qmake
- make -j4
- upx --lzma -9 --force bin/Attorney_Online
artifacts:
paths:
- bin/
deploy:
stage: deploy
dependencies:
- build linux x86_64
tags:
- docker
- linux
script:
- mkdir artifact
- cd artifact
# Base folder
- mkdir base
- mkdir base/themes
- cp -a ../base/themes/default base/themes/
- cp -a ../base/config.ini base/config.sample.ini
- cp -a ../base/serverlist.txt base/serverlist.sample.txt
# Miscellaneous files
- cp -a ../README.md README.md.txt
- cp -a ../LICENSE.MIT LICENSE.txt
# Shared libraries
- cp -a ../lib/* .
# Platform-specific
- cp -a ../bin/Attorney_Online .
- echo "#!/bin/sh" >> ./run.sh
- echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh
- chmod +x ./run.sh
# Zipping
# zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip .
- mkdir ../zip
- tar cavf ../zip/Attorney_Online_$(git describe --tags)_x64.tar.xz *
- sha1sum ../zip/*
artifacts:
paths:
- zip/