138 lines
3.4 KiB
YAML
138 lines
3.4 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 --disable-gtk --disable-python -d $MODE
|
|
- ./test.py $VALGRIND_FLAG $FULLNESS
|
|
cache:
|
|
paths:
|
|
- $CCACHE_BASEDIR_VALUE/
|
|
variables:
|
|
CCACHE_BASEDIR_VALUE: ns-3-ccache-storage
|
|
VALGRIND_FLAG: ""
|
|
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_FLAG: -g
|
|
only:
|
|
variables:
|
|
- $RELEASE == "weekly"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
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_FLAG: -g
|
|
only:
|
|
variables:
|
|
- $RELEASE == "weekly"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
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_FLAG: -g
|
|
only:
|
|
variables:
|
|
- $RELEASE == "weekly"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
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
|
|
- linux
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl libgcrypt gtk3 boost valgrind --noconfirm
|