164 lines
4.1 KiB
YAML
164 lines
4.1 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, default, optimized)
|
|
|
|
.base-test:
|
|
stage: test
|
|
script:
|
|
- mkdir -p $CCACHE_BASEDIR_VALUE
|
|
- export CCACHE_BASEDIR=${PWD}
|
|
- export CCACHE_DIR=${PWD}/$CCACHE_BASEDIR_VALUE
|
|
# workaround for Valgrind on Archlinux https://bbs.archlinux.org/viewtopic.php?pid=2036171#p2036171
|
|
- export DEBUGINFOD_URLS="https://debuginfod.archlinux.org"
|
|
# missing the flag --disable-python
|
|
- ./ns3 configure -d $MODE -GNinja --enable-examples --enable-tests --disable-gtk
|
|
- ./ns3 build
|
|
- ./test.py -n $VALGRIND_FLAG $FULLNESS
|
|
cache:
|
|
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
|
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
|
|
variables:
|
|
COMPILER: g++
|
|
MODE: debug
|
|
only:
|
|
variables:
|
|
- $RELEASE == "daily"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Run the test.py script with files compiled in default mode
|
|
daily-test-default:
|
|
extends: .base-test
|
|
image: archlinux
|
|
variables:
|
|
COMPILER: g++
|
|
MODE: default
|
|
only:
|
|
variables:
|
|
- $RELEASE == "daily"
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Run the test.py script with files compiled in optimized mode
|
|
daily-test-optimized:
|
|
extends: .base-test
|
|
image: archlinux
|
|
variables:
|
|
COMPILER: g++
|
|
MODE: optimized
|
|
only:
|
|
variables:
|
|
- $RELEASE == "daily"
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
### Valgrind tests
|
|
# Run the test.py script with files compiled in optimized mode + valgrind (daily)
|
|
daily-test-optimized-valgrind:
|
|
extends: .base-test
|
|
image: archlinux
|
|
variables:
|
|
COMPILER: g++
|
|
MODE: optimized
|
|
VALGRIND_FLAG: -g
|
|
only:
|
|
variables:
|
|
- $RELEASE == "daily"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Run the test.py script with files compiled in debug mode
|
|
weekly-test-debug-valgrind:
|
|
extends: .base-test
|
|
image: archlinux
|
|
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 gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Run the test.py script with files compiled in default mode
|
|
weekly-test-default-valgrind:
|
|
extends: .base-test
|
|
image: archlinux
|
|
variables:
|
|
COMPILER: g++
|
|
MODE: default
|
|
VALGRIND_FLAG: -g
|
|
only:
|
|
variables:
|
|
- $RELEASE == "weekly"
|
|
tags:
|
|
- nsnam
|
|
- linux
|
|
before_script:
|
|
- pacman -Syu --noconfirm
|
|
- pacman -Sy base-devel python ccache gsl gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Run the test.py script with files compiled in optimized mode
|
|
weekly-test-optimized-valgrind:
|
|
extends: .base-test
|
|
image: archlinux
|
|
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 gtk3 boost valgrind ninja cmake --noconfirm
|
|
|
|
# Do a check for the TAKES_FOREVER jobs, only in optimized mode
|
|
weekly-test-takes-forever-optimized:
|
|
extends: .base-test
|
|
image: archlinux
|
|
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 gtk3 boost valgrind ninja cmake --noconfirm
|