120 lines
2.4 KiB
YAML
120 lines
2.4 KiB
YAML
cache:
|
|
key: ${CI_COMMIT_REF_SLUG}
|
|
paths:
|
|
- lib/
|
|
|
|
before_script:
|
|
- echo Current working directory is $(pwd)
|
|
|
|
build linux x86_64:
|
|
image: rabits/qt:5.9-desktop
|
|
stage: build
|
|
tags:
|
|
- docker
|
|
- linux
|
|
script:
|
|
- qmake --version
|
|
- gcc --version
|
|
- sudo apt-get install --no-install-recommends -y upx zip unzip
|
|
|
|
- cd scripts
|
|
- ./configure_ubuntu.sh
|
|
- cd ..
|
|
|
|
- qmake
|
|
- make -j4
|
|
- upx --lzma -9 --force bin/Attorney_Online
|
|
artifacts:
|
|
paths:
|
|
- bin/
|
|
|
|
build windows i686:
|
|
image: ${CI_REGISTRY_IMAGE}/builder-windows-i686
|
|
stage: build
|
|
tags:
|
|
- docker
|
|
- linux
|
|
script:
|
|
# Extract BASS
|
|
- mkdir bass
|
|
- curl http://www.un4seen.com/files/bass24.zip -o bass.zip
|
|
- unzip bass.zip
|
|
- cp bass.dll ../../lib
|
|
- cd ..
|
|
|
|
# Build
|
|
- qmake
|
|
- make -j4
|
|
|
|
# Post-processing
|
|
- upx --lzma -9 --force bin/Attorney_Online.exe
|
|
|
|
# Base folder
|
|
.deploy_base: &deploy_base |
|
|
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
|
|
.deploy_misc: &deploy_misc |
|
|
cp -a ../README.md README.md.txt
|
|
cp -a ../LICENSE.MIT LICENSE.txt
|
|
|
|
# Shared libraries
|
|
.deploy_libs: &deploy_libs |
|
|
cp -a ../lib/* .
|
|
|
|
deploy linux:
|
|
stage: deploy
|
|
dependencies:
|
|
- build linux x86_64
|
|
tags:
|
|
- docker
|
|
- linux
|
|
script:
|
|
- mkdir artifact
|
|
- cd artifact
|
|
- *deploy_base
|
|
- *deploy_misc
|
|
- *deploy_libs
|
|
|
|
# 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/
|
|
|
|
deploy windows:
|
|
stage: deploy
|
|
dependencies:
|
|
- build windows i686
|
|
tags:
|
|
- docker
|
|
- linux
|
|
script:
|
|
- mkdir artifact
|
|
- cd artifact
|
|
- *deploy_base
|
|
- *deploy_misc
|
|
- *deploy_libs
|
|
|
|
# Platform-specific
|
|
- cp -a ../bin/Attorney_Online.exe .
|
|
|
|
# Zipping
|
|
# -r: recursive; -9: max compression; -l: convert to CR LF
|
|
- zip -r -9 -l Attorney_Online_$(git describe --tags)_windows_i386.zip .
|
|
artifacts:
|
|
paths:
|
|
- zip/ |