* add .gitlab-ci.yml * Update to fix issues fix artifact selection fix rpm builds mostly fix debian builds (still have cmake issue) update to conform with #2373 combined rc and debug stages (more efficient as one stage) add unused deploy section (can be finished/configured later) * remove old bintray bits * fix issues simplify `mkdir` command remove bintray deploy
186 lines
4.7 KiB
YAML
186 lines
4.7 KiB
YAML
stages:
|
|
- build
|
|
- deploy
|
|
|
|
.artifacts: &artifacts
|
|
artifacts:
|
|
paths:
|
|
- build/
|
|
|
|
.cache: &cache
|
|
cache:
|
|
key: "$CI_BUILD_NAME"
|
|
paths:
|
|
- cache/
|
|
|
|
|
|
#================================ DEBIAN-BASED ================================
|
|
|
|
.build_rc_package_deb: &build_rc_package_deb
|
|
stage: build
|
|
script:
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB
|
|
- make package -j2
|
|
|
|
.build_debug_package_deb: &build_debug_package_deb
|
|
stage: build
|
|
script:
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Debug -DCPACK_GENERATOR=DEB
|
|
- make package -j2
|
|
|
|
.deb-artifacts: &artifacts_deb
|
|
artifacts:
|
|
paths:
|
|
- build/*.deb
|
|
- build/CMakeFiles/*.log
|
|
when: always
|
|
|
|
#----------------------------------- UBUNTU -----------------------------------
|
|
|
|
.requirements_16xx: &install_requirements_16xx
|
|
before_script:
|
|
- apt-get -o dir::cache::archives="cache" update -qq
|
|
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
|
|
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
|
|
- apt-get -o dir::cache::archives="cache" install -y qt5-default qttools5-dev qttools5-dev-tools
|
|
- apt-get -o dir::cache::archives="cache" install -y qtmultimedia5-dev libqt5multimedia5-plugins
|
|
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5sql5-mysql
|
|
- apt-get -o dir::cache::archives="cache" install -y libqt5websockets5-dev
|
|
|
|
.build_1604: &1604
|
|
image: ubuntu:16.04
|
|
tags:
|
|
- linux
|
|
- docker
|
|
<<: *install_requirements_16xx
|
|
<<: *artifacts_deb
|
|
<<: *cache
|
|
|
|
.build_1610: &1610
|
|
image: ubuntu:16.10
|
|
tags:
|
|
- linux
|
|
- docker
|
|
<<: *install_requirements_16xx
|
|
<<: *artifacts_deb
|
|
<<: *cache
|
|
|
|
build_rc_1604:
|
|
<<: *1604
|
|
<<: *build_rc_package_deb
|
|
when: always
|
|
|
|
build_debug_1604:
|
|
<<: *1604
|
|
<<: *build_debug_package_deb
|
|
when: always
|
|
|
|
build_rc_1610:
|
|
<<: *1610
|
|
<<: *build_rc_package_deb
|
|
when: always
|
|
|
|
build_debug_1610:
|
|
<<: *1610
|
|
<<: *build_debug_package_deb
|
|
when: always
|
|
allow_failure: true
|
|
|
|
#----------------------------------- DEBIAN -----------------------------------
|
|
|
|
.requirements_stretch: &install_requirements_stretch
|
|
before_script:
|
|
- apt-get -o dir::cache::archives="cache" update -qq
|
|
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
|
|
- apt-get -o dir::cache::archives="cache" install -y qt5-default qtbase5-dev-tools
|
|
- apt-get -o dir::cache::archives="cache" install -y qttools5-dev-tools qtmultimedia5-dev
|
|
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5websockets5-dev
|
|
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
|
|
|
|
.build_stretch: &stretch
|
|
image: debian:stretch
|
|
tags:
|
|
- linux
|
|
- docker
|
|
<<: *install_requirements_stretch
|
|
<<: *artifacts_deb
|
|
<<: *cache
|
|
|
|
build_rc_stretch:
|
|
<<: *stretch
|
|
<<: *build_rc_package_deb
|
|
when: always
|
|
|
|
build_debug_stretch:
|
|
<<: *stretch
|
|
<<: *build_debug_package_deb
|
|
when: always
|
|
allow_failure: true
|
|
|
|
|
|
#============================== REDHAT-BASED ==================================
|
|
|
|
.build_rc_package_rpm: &build_rc_package_rpm
|
|
stage: build
|
|
script:
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=RPM
|
|
- make package -j2
|
|
|
|
.build_debug_package_rpm: &build_debug_package_rpm
|
|
stage: build
|
|
script:
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Debug -DCPACK_GENERATOR=RPM
|
|
- make package -j2
|
|
|
|
.rpm-artifacts: &artifacts_rpm
|
|
artifacts:
|
|
paths:
|
|
- build/*.rpm
|
|
- build/CMakeFiles/*.log
|
|
when: always
|
|
|
|
#--------------------------------- FEDORA -------------------------------------
|
|
|
|
.requirements_fedora22: &install_requirements_fedora22
|
|
before_script:
|
|
- /usr/bin/dnf -y groupinstall "development tools"
|
|
- /usr/bin/dnf -y install wget qt5* cmake libgcrypt-devel dh-autoreconf gcc-c++
|
|
- /usr/bin/dnf -y install protobuf protobuf-devel rpm-build
|
|
|
|
.build_fedora22: &fedora22
|
|
image: fedora:22
|
|
tags:
|
|
- linux
|
|
- docker
|
|
<<: *install_requirements_fedora22
|
|
<<: *artifacts_rpm
|
|
<<: *cache
|
|
|
|
build_rc_fedora22:
|
|
<<: *fedora22
|
|
<<: *build_rc_package_rpm
|
|
when: always
|
|
|
|
build_debug_fedora22:
|
|
<<: *fedora22
|
|
<<: *build_debug_package_rpm
|
|
when: always
|
|
|
|
|
|
#=================================== DEPLOY ===================================
|
|
|
|
# deploy_to_s3: # currently unused; requires some config
|
|
# stage: deploy
|
|
# script:
|
|
# # if CI_BUILD_TAG is undefined, use git hash instead of version number
|
|
# # otherwise, treat git tag as version number
|
|
# # TODO: add deploy commands
|
|
# when: on_success
|