Skip to content

Commit

Permalink
Travis testing extended to test c++11 and c++14 with gcc-5
Browse files Browse the repository at this point in the history
- SWIG executable compiled with gcc-5 using both c++11 and c++14 standards
- cpp11 tests enabled using c++11 standard
- Add clang compile using c++11
  • Loading branch information
wsfulton committed Jul 8, 2015
1 parent 701f8d4 commit 9244621
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
language: cpp
compiler:
- clang
- gcc
env:
- SWIGLANG=
matrix:
include:
- compiler: clang
env: SWIGLANG=
- compiler: gcc
env: SWIGLANG=
- compiler: gcc
env: SWIGLANG= GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG= GCC5=1 CPP14=1
- compiler: gcc
env: SWIGLANG=csharp
- compiler: gcc
Expand Down Expand Up @@ -62,6 +65,12 @@ matrix:
env: SWIGLANG=scilab
- compiler: gcc
env: SWIGLANG=tcl
- compiler: gcc
env: SWIGLANG=csharp GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG=java GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG=python GCC5=1 CPP11=1
allow_failures:
# Lots of failing tests currently
- compiler: gcc
Expand All @@ -85,6 +94,7 @@ before_install:
- sudo apt-get -qq update
- time sudo apt-get -qq install libboost-dev
- if test -z "$SWIGLANG"; then sudo apt-get -qq install yodl; fi
- if test -n "$GCC5"; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get -qq update && sudo apt-get install -qq g++-5 && export CC=gcc-5 && export CXX=g++-5; fi
- if test "$SWIGLANG" = "csharp"; then sudo apt-get -qq install mono-devel; fi
- if test "$SWIGLANG" = "d"; then wget http://downloads.dlang.org/releases/2014/dmd_2.066.0-0_amd64.deb; sudo dpkg -i dmd_2.066.0-0_amd64.deb; fi
- if test "$SWIGLANG" = "go"; then go env | sed -e 's/^/export /' > goenvsetup && source goenvsetup && rm -f goenvsetup; fi # Until configure.ac is fixed
Expand All @@ -100,18 +110,21 @@ before_install:
- if test "$SWIGLANG" = "php"; then sudo apt-get install php5-cli php5-dev; fi
- if test "$SWIGLANG" = "python"; then git clone https://github.com/jcrocholl/pep8.git && pushd pep8 && git checkout tags/1.5.7 && python ./setup.py build && sudo python ./setup.py install && popd; fi
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && CONFIGOPTS+=("--with-python${PY3}=python${VER}"); fi
- if test "$SWIGLANG" = "r"; then sudo apt-get -qq install r-base; fi
- if test "$SWIGLANG" = "scilab"; then sudo apt-get -qq install scilab; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
- if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++11 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra"); fi
- if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++14 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra"); fi
- $CC --version
- $CXX --version
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
- export cflags=$(Tools/testflags.py --language $SWIGLANG --cflags) && echo $cflags
- export cxxflags=$(Tools/testflags.py --language $SWIGLANG --cxxflags) && echo $cxxflags
script:
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure $CONFIGOPTS
- echo "${CONFIGOPTS[@]}"
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
- echo -en 'travis_fold:end:script.1\\r'
- make -s $SWIGJOBS
- ./swig -version && ./swig -pcreversion
Expand Down

0 comments on commit 9244621

Please sign in to comment.