cache: key: ${CI_COMMIT_REF_SLUG} paths: - lib/ before_script: - echo Current working directory is $(pwd) build linux x86_64: image: rabits/qt:5.4-desktop stage: build tags: - docker - linux script: - qmake --version - gcc --version - sudo apt-get install --no-install-recommends -y upx 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 - cd bass - curl http://www.un4seen.com/files/bass24.zip -o bass.zip - unzip bass.zip - cp bass.dll ../lib - cd .. # Build - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake - make -j4 # Post-processing - upx --lzma -9 --force bin/Attorney_Online.exe artifacts: paths: - bin/ # 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 deploy linux: stage: deploy dependencies: - build linux x86_64 tags: - docker - linux script: - mkdir artifact - cd artifact - *deploy_base - *deploy_misc # Platform-specific - cp -a ../lib/*.so . - 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: image: ubuntu stage: deploy dependencies: - build windows i686 tags: - docker - linux script: - apt-get update - apt-get install --no-install-recommends -y zip git - mkdir artifact - cd artifact - *deploy_base - *deploy_misc # Platform-specific - cp -a ../lib/*.dll . - cp -a ../bin/Attorney_Online.exe . # Zipping # -r: recursive; -9: max compression; -l: convert to CR LF - mkdir ../zip - zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_i386.zip . - sha1sum ../zip/* artifacts: paths: - zip/