From 49ecab2fdf5523f87b55571286b528ff33e69df7 Mon Sep 17 00:00:00 2001 From: Alexander Afanasyev Date: Sun, 31 May 2020 00:03:17 -0400 Subject: [PATCH] Prepare release 2.8 Change-Id: I98c36a7763387cd27df88713e68035dff222b187 --- .jenkins.d/01-deps.sh | 47 +++++++++-- .jenkins.d/10-build.sh | 12 ++- .jenkins.d/20-tests.sh | 35 ++------ .jenkins.d/README.md | 33 ++++++++ .jenkins.d/util.sh | 19 +++++ .travis.yml | 103 ++++++++++++++++++----- VERSION | 1 - docs/source/RELEASE_NOTES.rst | 26 ++++++ docs/source/_templates/indexcontent.html | 5 +- docs/source/getting-started.rst | 31 +++---- 10 files changed, 234 insertions(+), 78 deletions(-) create mode 100644 .jenkins.d/README.md delete mode 100644 VERSION diff --git a/.jenkins.d/01-deps.sh b/.jenkins.d/01-deps.sh index db2d80879..d3709b5e8 100755 --- a/.jenkins.d/01-deps.sh +++ b/.jenkins.d/01-deps.sh @@ -7,19 +7,48 @@ source "$JDIR"/util.sh set -x if has OSX $NODE_LABELS; then + FORMULAE=(boost pkg-config libxml2) + if [[ -n $USE_OPENSSL_1_1 ]]; then + FORMULAE+=(openssl@1.1) + else + FORMULAE+=(openssl) + fi + brew update - brew upgrade - brew install boost pkg-config cryptopp openssl - brew install libxml2 - brew link --force libxml2 + if [[ -n $TRAVIS ]]; then + # Travis images come with a large number of brew packages + # pre-installed, don't waste time upgrading all of them + for FORMULA in "${FORMULAE[@]}"; do + brew outdated $FORMULA || brew upgrade $FORMULA + done + else + brew upgrade + fi + brew install "${FORMULAE[@]}" brew cleanup fi if has Ubuntu $NODE_LABELS; then sudo apt-get -qq update - sudo apt-get -qq install build-essential pkg-config libboost-all-dev \ - libcrypto++-dev libsqlite3-dev libssl-dev - sudo apt-get install -qq -y python-setuptools python-dev python-pygraphviz python-kiwi - # sudo apt-get install -qq -y python-pygoocanvas python-gnome2 - # sudo apt-get install -qq -y python-rsvg ipython + sudo apt-get -qy install build-essential pkg-config libboost-all-dev \ + libsqlite3-dev libssl-dev + + if [[ $JOB_NAME == *"code-coverage" ]]; then + sudo apt-get -qy install gcovr lcov libgd-perl + fi +fi + +if has Ubuntu-16.04 $NODE_LABELS; then + sudo apt-get -qy install python-setuptools python-dev python-pygraphviz castxml \ + python-kiwi python-gnome2 ipython libcairo2-dev python3-gi \ + libgirepository1.0-dev python-gi python-gi-cairo \ + gir1.2-gtk-3.0 gir1.2-goocanvas-2.0 python-pip + sudo pip install pygraphviz pycairo PyGObject pygccxml +elif has Ubuntu $NODE_LABELS; then + sudo apt-get -qy install build-essential libsqlite3-dev libboost-all-dev libssl-dev \ + git python3-setuptools castxml \ + gir1.2-goocanvas-2.0 gir1.2-gtk-3.0 libgirepository1.0-dev \ + python3-dev python3-gi python3-gi-cairo \ + python3-pip python3-pygraphviz python3-pygccxml + sudo pip3 install kiwi fi diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh index f0fb72e35..58599ea25 100755 --- a/.jenkins.d/10-build.sh +++ b/.jenkins.d/10-build.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash -set -x set -e JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) source "$JDIR"/util.sh +set -x + pushd ns-3 >/dev/null git submodule update --init @@ -13,15 +14,18 @@ git submodule update --init sudo rm -Rf build/ .waf-1* .waf3-1* find . -name '*.pyc' | sudo xargs rm -f -# Configure/build in debug mode if has OSX $NODE_LABELS; then export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/libxml2/lib/pkgconfig" + if [[ -n $USE_OPENSSL_1_1 ]]; then + OPENSSL="--with-openssl=/usr/local/opt/openssl@1.1" + fi fi -./waf -j${WAF_JOBS:-1} configure -d debug --enable-examples --enable-tests $EXTRA_FLAGS + +./waf -j${WAF_JOBS:-1} configure -d debug --enable-examples --enable-tests $OPENSSL ./waf -j${WAF_JOBS:-1} build # Install -sudo ./waf -j${WAF_JOBS:-1} install +sudo_preserve_env PATH -- ./waf -j${WAF_JOBS:-1} install if has Linux $NODE_LABELS; then sudo ldconfig diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh index bf142362e..bf0bfeeb6 100755 --- a/.jenkins.d/20-tests.sh +++ b/.jenkins.d/20-tests.sh @@ -1,40 +1,19 @@ #!/usr/bin/env bash -set -x +set -e JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) source "$JDIR"/util.sh -set -e +set -x pushd ns-3 >/dev/null -BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; v = _cache.BOOST_VERSION.split('_'); print int(v[0]) * 100000 + int(v[1]) * 100;") - -ut_log_args() { - if (( BOOST_VERSION >= 106200 )); then - echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-${1:-report}.xml - else - if [[ -n $XUNIT ]]; then - echo --log_level=all $( (( BOOST_VERSION >= 106000 )) && echo -- ) \ - --log_format2=XML --log_sink2=build/xunit-${1:-report}.xml - else - echo --log_level=test_suite - fi - fi -} - -ASAN_OPTIONS="color=always" -ASAN_OPTIONS+=":detect_leaks=false" -ASAN_OPTIONS+=":detect_stack_use_after_return=true" -ASAN_OPTIONS+=":check_initialization_order=true" -ASAN_OPTIONS+=":strict_init_order=true" -ASAN_OPTIONS+=":detect_invalid_pointer_pairs=1" -ASAN_OPTIONS+=":detect_container_overflow=false" -ASAN_OPTIONS+=":strict_string_checks=true" -ASAN_OPTIONS+=":strip_path_prefix=${PWD}/" -export ASAN_OPTIONS +export BOOST_TEST_BUILD_INFO=1 +export BOOST_TEST_COLOR_OUTPUT=1 +export BOOST_TEST_DETECT_MEMORY_LEAK=0 +export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml # Run unit tests -./waf --run "ndnSIM-unit-tests $(ut_log_args)" +./waf --run "ndnSIM-unit-tests" popd >/dev/null diff --git a/.jenkins.d/README.md b/.jenkins.d/README.md new file mode 100644 index 000000000..7c78349f5 --- /dev/null +++ b/.jenkins.d/README.md @@ -0,0 +1,33 @@ +CONTINUOUS INTEGRATION SCRIPTS +============================== + +Environment Variables Used in Build Scripts +------------------------------------------- + +- `NODE_LABELS`: the variable defines a list of OS properties. The set values are used by the + build scripts to select proper behavior for different OS. + + The list should include at least `[OS_TYPE]`, `[DISTRO_TYPE]`, and `[DISTRO_VERSION]`. + + Possible values for Linux: + + * `[OS_TYPE]`: `Linux` + * `[DISTRO_TYPE]`: `Ubuntu` + * `[DISTRO_VERSION]`: `Ubuntu-16.04`, `Ubuntu-18.04` + + Possible values for macOS: + + * `[OS_TYPE]`: `OSX` + * `[DISTRO_TYPE]`: `OSX` (can be absent) + * `[DISTRO_VERSION]`: `OSX-10.12`, `OSX-10.13`, `OSX-10.14` + +- `JOB_NAME`: optional variable to define type of the job. Depending on the defined job type, + the build scripts can perform different tasks. + + Possible values: + + * empty: default build process + * `code-coverage` (Ubuntu Linux is assumed): debug build with tests and code coverage analysis + * `limited-build`: only a single debug build with tests + +- `WAF_JOBS`: number of parallel build jobs used by waf, defaults to 1. diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh index a89bc2739..8ddc4baf6 100755 --- a/.jenkins.d/util.sh +++ b/.jenkins.d/util.sh @@ -16,3 +16,22 @@ has() { set ${saved_xtrace} return ${ret} } + +sudo_preserve_env() { + local saved_xtrace + [[ $- == *x* ]] && saved_xtrace=-x || saved_xtrace=+x + set +x + + local vars=() + while [[ $# -gt 0 ]]; do + local arg=$1 + shift + case ${arg} in + --) break ;; + *) vars+=("${arg}=${!arg}") ;; + esac + done + + set ${saved_xtrace} + sudo env "${vars[@]}" "$@" +} diff --git a/.travis.yml b/.travis.yml index 08e40e9f6..a49b5e8e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,89 @@ -sudo: required -language: generic +version: ~> 1.0 +language: cpp +os: linux +dist: bionic +arch: amd64 + env: - global: - - WAF_JOBS=2 -matrix: + - COMPILER=g++-7 + - COMPILER=g++-9 + - COMPILER=clang++-6.0 + - COMPILER=clang++-9 + +jobs: include: - - os: linux - dist: xenial - env: - - CXX=g++ - - NODE_LABELS="Linux Ubuntu Ubuntu-16.04" + # Linux + - env: COMPILER=g++-8 + - env: COMPILER=clang++-5.0 + - env: COMPILER=clang++-7 + - env: COMPILER=clang++-8 + - env: COMPILER=clang++-10 + - env: COMPILER=clang++-11 + + # macOS - os: osx - osx_image: xcode10.1 - env: - - CXX=clang++ - - xcode10.1 - - NODE_LABELS="OSX OSX_VERSION=10.13" -notifications: - email: - on_success: always - on_failure: always + osx_image: xcode11.4 + env: # default compiler + + allow_failures: + - env: COMPILER=clang++-11 + + fast_finish: true + +before_install: + - | + : Adding apt repositories + case ${COMPILER} in + g++-9) + # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test/+packages + travis_retry sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + travis_retry sudo apt-get -qq update + ;; + clang++-1?) + # https://apt.llvm.org/ + LLVM_REPO=${COMPILER/clang++/llvm-toolchain-${TRAVIS_DIST}} + travis_retry wget -nv -O - "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - + travis_retry sudo add-apt-repository -y "deb http://apt.llvm.org/${TRAVIS_DIST}/ ${LLVM_REPO%-11} main" + travis_retry sudo apt-get -qq update + ;; + esac + +install: + - | + : Installing C++ compiler + if [[ -n ${COMPILER} ]]; then + travis_retry sudo apt-get -qy install ${COMPILER/clang++/clang} + fi + +before_script: + - | + : Setting environment variables + if [[ -n ${COMPILER} ]]; then + export CXX=${COMPILER} + fi + case ${TRAVIS_OS_NAME} in + linux) export NODE_LABELS="Linux Ubuntu Ubuntu-18.04" ;; + osx) export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)" ;; + esac + export JOB_NAME=limited-build + export WAF_JOBS=2 + - | + : Enabling workarounds + case "${TRAVIS_CPU_ARCH},${COMPILER}" in + arm64,g++*) + # Avoid exceeding the per-job time limit + export DISABLE_HEADERS_CHECK=yes + ;; + ppc64le,g++-7) + # AddressSanitizer does not seem to be working + export DISABLE_ASAN=yes + ;; + *,clang++-8) + # https://bugs.llvm.org/show_bug.cgi?id=40808 + export DISABLE_ASAN=yes + ;; + esac + - ${CXX:-c++} --version + script: - ./.jenkins diff --git a/VERSION b/VERSION deleted file mode 100644 index 227cea215..000000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.0.0 diff --git a/docs/source/RELEASE_NOTES.rst b/docs/source/RELEASE_NOTES.rst index 4e2187db4..bd0b38e70 100644 --- a/docs/source/RELEASE_NOTES.rst +++ b/docs/source/RELEASE_NOTES.rst @@ -5,6 +5,32 @@ This file contains ndnSIM release notes. All of the ndnSIM documentation is accessible from the `ndnSIM website `__. +Release 2.8 +----------- + +- The submodules of NFD and ndn-cxx have been upgraded to version 0.7.0. + + `NFD 0.7.0 release notes `__ + + `ndn-cxx 0.7.0 release notes `__ + + .. note:: + In order to retrieve the marked versions of ndn-cxx and NFD, use + ``--recursive`` option to the git clone command or run ``git + submodule update --init`` after clone, pull, or merge. + +- With the underlying NFD/ndn-cxx upgrade, ndnSIM now operates with NDN Packet format version 0.3. + +- Base NS-3 was rebased to version 3.30.1 + +- Add Loop-Free In-port Dependent (LFID) route calculation that provides a set of + loop-free paths (:issue:`4985`) + +- Fix wrong behaviour of default Size in ConsumerWindow + +- **Remove** legacy content store implementation. Use content store replacement/placement + policies implemented using NFD routines. + Release 2.7 ----------- diff --git a/docs/source/_templates/indexcontent.html b/docs/source/_templates/indexcontent.html index 71289ddad..c5810a1ce 100644 --- a/docs/source/_templates/indexcontent.html +++ b/docs/source/_templates/indexcontent.html @@ -59,8 +59,9 @@

ndnSIM tutorial

ndnSIM Versions

- + +