Files
unison/utils/tests/gitlab-ci.yml
Mathew Bielejeski 941a67fca7 Adjust GitLab.com CI configuration for build version feature
* Add a git tag to the tip of the branch before building
* Install git package before building
* Update ubuntu and fedora builds to install git package
2020-08-14 14:14:37 -07:00

90 lines
2.7 KiB
YAML

# NS3 CI script
# For naming purposes, we will prepend ".base-" on the jobs
# that are not complete and need to be extended (hopefully
# we write in the documentation before the job what should be
# added to have a working jobs).
# As per Gitlab documentation, extends supports multi-level inheritance,
# however it is not recommended to use more than three levels.
# Any scheduled pipeline should define a variable, named "RELEASE", that
# indicates what this script is run for. Allowed values, for the moment,
# are "daily" and "weekly" to denote a daily (or weekly) job.
# Our configuration is not strictly sequential, or by using different
# words, we do not expect the CI infrastructure to run build, test, and
# documentation jobs each time that a commit is done. We use a different
# configuration, still in definition. It will be in the documentation.
stages:
- build
- test
- documentation
###################### BUILD STAGE #############################################
# Defines the steps to run the tests
# Inherit with "extends: .base-build" and remember to set
# the following variables: COMPILER (g++, clang++, ...) and
# MODE (debug, release, optimized)
.base-build:
stage: build
script:
# Add a git tag so that build version works with the CI fetching shallow clones
- git tag ns-3-dev-ci
- mkdir -p $CCACHE_BASEDIR_VALUE
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/$CCACHE_BASEDIR_VALUE
- CXX="ccache $COMPILER" ./waf configure --enable-examples --enable-tests -d $MODE
- ./waf
cache:
paths:
- $CCACHE_BASEDIR_VALUE/
timeout: 9h
variables:
CCACHE_BASEDIR_VALUE: ns-3-ccache-storage
# Defines the per-commit jobs. They are executed for any branch
per-commit-compile-debug:
extends: .base-build
image: archlinux/base
variables:
COMPILER: g++
MODE: debug
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost git --noconfirm
per-commit-compile-release:
extends: .base-build
image: archlinux/base
variables:
COMPILER: g++
MODE: release
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost git --noconfirm
per-commit-compile-optimized:
extends: .base-build
image: archlinux/base
variables:
COMPILER: g++
MODE: optimized
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost git --noconfirm
# Weekly jobs for other distribution and compilers
include:
- 'utils/tests/gitlab-ci-ubuntu.yml'
- 'utils/tests/gitlab-ci-fedora.yml'
- 'utils/tests/gitlab-ci-gcc.yml'
- 'utils/tests/gitlab-ci-clang.yml'
- 'utils/tests/gitlab-ci-test.yml'
- 'utils/tests/gitlab-ci-doc.yml'