Files
unison/utils/tests/gitlab-ci-test.yml
2019-03-07 17:26:49 +01:00

134 lines
3.3 KiB
YAML

# NS3 CI script for testing
# Defines the steps to run the tests
# Inherit with "extends: .base-test" and remember to set
# the following variables: COMPILER (g++, clang++, ...) and
# MODE (debug, release, optimized)
.base-test:
stage: test
script:
- 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
- ./test.py $VALGRIND $FULLNESS
cache:
paths:
- $CCACHE_BASEDIR_VALUE/
variables:
CCACHE_BASEDIR_VALUE: ns-3-ccache-storage
VALGRIND: ""
FULLNESS: ""
# Run the test.py script with files compiled in debug mode
daily-test-debug:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: debug
only:
variables:
- $RELEASE == "daily"
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
# Run the test.py script with files compiled in release mode
daily-test-release:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: release
only:
variables:
- $RELEASE == "daily"
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
# Run the test.py script with files compiled in optimized mode
daily-test-optimized:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: optimized
only:
variables:
- $RELEASE == "daily"
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
### Valgrind tests
# Run the test.py script with files compiled in debug mode
weekly-test-debug:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: debug
VALGRIND: -g
only:
variables:
- $RELEASE == "weekly"
tags:
- nsnam
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
# Run the test.py script with files compiled in release mode
weekly-test-release:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: release
VALGRIND: -g
only:
variables:
- $RELEASE == "weekly"
tags:
- nsnam
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
# Run the test.py script with files compiled in optimized mode
weekly-test-optimized:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: optimized
VALGRIND: -g
only:
variables:
- $RELEASE == "weekly"
tags:
- nsnam
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
# Do a check for the TAKES_FOREVER jobs, only in optimized mode
weekly-test-takes-forever-optimized:
extends: .base-test
image: archlinux/base
variables:
COMPILER: g++
MODE: optimized
FULLNESS: "-f TAKES_FOREVER"
only:
variables:
- $RELEASE == "weekly"
tags:
- nsnam
before_script:
- pacman -Syu --noconfirm
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm