Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
164 lines (137 sloc) 3.29 KB
before_script:
- export DISTRO_CODENAME=`lsb_release -cs` && echo Using distro $DISTRO_CODENAME
variables:
GET_SOURCES_ATTEMPTS: 3
#########################
# Templates using anchors
#########################
.amd64_trusty_t: &amd64_trusty_job
image: registry.roboception.de/tools/docker_images:buildimage
tags:
- amd64
- docker
.armhf_trusty_t: &armhf_trusty_job
image: registry.roboception.de/tools/docker_images:armhf-buildimage
tags:
- armhf
- docker
.amd64_xenial_t: &amd64_xenial_job
image: registry.roboception.de/tools/docker_images:xenial-buildimage
tags:
- amd64
- docker
.armhf_xenial_t: &armhf_xenial_job
image: registry.roboception.de/tools/docker_images:armhf-xenial-buildimage
tags:
- armhf
- docker
.amd64_bionic_t: &amd64_bionic_job
image: registry.roboception.de/tools/docker_images:bionic-buildimage
tags:
- amd64
- docker
#############
# Templates
#############
.test:
stage: test
script:
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX="/usr" -DINSTALL_COMPLETION=ON ..
- make -j 4
- CTEST_OUTPUT_ON_FAILURE=1 make test
# Debian packaging
.package:
stage: deploy
script:
- mkdir build && cd build
- cmake -DCMAKE_INSTALL_PREFIX="/usr" -DINSTALL_COMPLETION=ON ..
- make -j 4
- make package
- if [ -z "$APT_REPO" ]; then export APT_REPO=testing; fi
- upload_deb.sh $DISTRO_CODENAME-$APT_REPO *.deb
.package_testing:
extends: .package
only:
- master
variables:
TESTING_DEBS: "true"
APT_REPO: "testing"
.package_stable:
extends: .package
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+/
except:
- branches
variables:
APT_REPO: "stable"
##############
#### Jobs ####
##############
gen_dox:
<<: *amd64_trusty_job
variables:
TESTING_DEBS: "true"
stage: deploy
script:
- apt-get install -y doxygen ncftp
- mkdir build && cd build
- cmake ..
- make doc
- upload_dox.sh doc/html
only:
- master
- tags
tags:
- docs
# Test (on every commit)
########################
test:trusty:amd64:
<<: *amd64_trusty_job
extends: .test
test:trusty:armhf:
<<: *armhf_trusty_job
extends: .test
test:xenial:amd64:
<<: *amd64_xenial_job
extends: .test
test:xenial:armhf:
<<: *armhf_xenial_job
extends: .test
test:bionic:amd64:
<<: *amd64_bionic_job
extends: .test
# Deploy testing (only on master)
#################################
package_testing:trusty:amd64:
<<: *amd64_trusty_job
extends: .package_testing
package_testing:trusty:armhf:
<<: *armhf_trusty_job
extends: .package_testing
package_testing:xenial:amd64:
<<: *amd64_xenial_job
extends: .package_testing
package_testing:xenial:armhf:
<<: *armhf_xenial_job
extends: .package_testing
package_testing:bionic:amd64:
<<: *amd64_bionic_job
extends: .package_testing
# Deploy stable (only for releases, version tags)
#################################################
package_stable:trusty:amd64:
<<: *amd64_trusty_job
extends: .package_stable
package_stable:trusty:armhf:
<<: *armhf_trusty_job
extends: .package_stable
package_stable:xenial:amd64:
<<: *amd64_xenial_job
extends: .package_stable
package_stable:xenial:armhf:
<<: *armhf_xenial_job
extends: .package_stable
package_stable:bionic:amd64:
<<: *amd64_bionic_job
extends: .package_stable
You can’t perform that action at this time.