Merge branch 'DarthGandalf-osx'
* DarthGandalf-osx: Add executable permissions to new scripts Travis: unify GCC5 and SWIG_CC variables Make sure travis doesn't silently skip testing of some language Add R to testflags.py Integrate OS X .travis.yml into master branch using multi-os feature.
This commit is contained in:
commit
6f331298fe
5 changed files with 240 additions and 43 deletions
141
.travis.yml
141
.travis.yml
|
|
@ -2,128 +2,186 @@ language: cpp
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=
|
env: SWIGLANG=
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=
|
env: SWIGLANG=
|
||||||
|
- os: linux
|
||||||
|
env: SWIGLANG= SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
|
||||||
|
- os: linux
|
||||||
|
env: SWIGLANG= SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP14=1
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: SWIGLANG= GCC5=1 CPP11=1
|
os: linux
|
||||||
- compiler: gcc
|
|
||||||
env: SWIGLANG= GCC5=1 CPP14=1
|
|
||||||
- compiler: gcc
|
|
||||||
env: SWIGLANG=csharp
|
env: SWIGLANG=csharp
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=d
|
env: SWIGLANG=d
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=go
|
env: SWIGLANG=go
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=guile
|
env: SWIGLANG=guile
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=java
|
env: SWIGLANG=java
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=javascript ENGINE=node
|
env: SWIGLANG=javascript ENGINE=node
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=javascript ENGINE=jsc
|
env: SWIGLANG=javascript ENGINE=jsc
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=javascript ENGINE=v8
|
env: SWIGLANG=javascript ENGINE=v8
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=lua
|
env: SWIGLANG=lua
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=octave SWIGJOBS=-j3 # 3.2
|
env: SWIGLANG=octave SWIGJOBS=-j3 # 3.2
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
|
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
|
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=perl5
|
env: SWIGLANG=perl5
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=php
|
env: SWIGLANG=php
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python VER=2.4
|
env: SWIGLANG=python VER=2.4
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python VER=2.5
|
env: SWIGLANG=python VER=2.5
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python VER=2.6
|
env: SWIGLANG=python VER=2.6
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python # 2.7
|
env: SWIGLANG=python # 2.7
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python PY3=3 # 3.2
|
env: SWIGLANG=python PY3=3 # 3.2
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python PY3=3 VER=3.3
|
env: SWIGLANG=python PY3=3 VER=3.3
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python PY3=3 VER=3.4
|
env: SWIGLANG=python PY3=3 VER=3.4
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-builtin
|
env: SWIGLANG=python SWIG_FEATURES=-builtin
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3
|
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-O
|
env: SWIGLANG=python SWIG_FEATURES=-O
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-classic
|
env: SWIGLANG=python SWIG_FEATURES=-classic
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=r
|
env: SWIGLANG=r
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=ruby
|
env: SWIGLANG=ruby
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=scilab
|
env: SWIGLANG=scilab
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=tcl
|
env: SWIGLANG=tcl
|
||||||
- compiler: gcc
|
- os: linux
|
||||||
env: SWIGLANG=csharp GCC5=1 CPP11=1
|
env: SWIGLANG=csharp SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
|
||||||
- compiler: gcc
|
- os: linux
|
||||||
env: SWIGLANG=java GCC5=1 CPP11=1
|
env: SWIGLANG=java SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
|
||||||
- compiler: gcc
|
- os: linux
|
||||||
env: SWIGLANG=python GCC5=1 CPP11=1
|
env: SWIGLANG=python SWIG_CC=gcc-5 SWIG_CXX=g++-5 CPP11=1
|
||||||
|
- os: osx
|
||||||
|
env: SWIGLANG= SWIG_CC=gcc-4.2 SWIG_CXX=g++-4.2
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=csharp
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=go
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=guile
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=java
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=lua
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=perl5
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=php
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=python
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=python PY3=3
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=ruby
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=tcl
|
||||||
|
|
||||||
allow_failures:
|
allow_failures:
|
||||||
# Lots of failing tests currently
|
# Lots of failing tests currently
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=ocaml
|
env: SWIGLANG=ocaml
|
||||||
# Occasional gcc internal compiler error
|
# Occasional gcc internal compiler error
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
|
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
|
||||||
# Occasional gcc internal compiler error
|
# Occasional gcc internal compiler error
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
|
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
|
||||||
# Not quite working yet
|
# Not quite working yet
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-classic
|
env: SWIGLANG=python SWIG_FEATURES=-classic
|
||||||
# Not quite working yet
|
# Not quite working yet
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
env: SWIGLANG=python SWIG_FEATURES=-O
|
env: SWIGLANG=python SWIG_FEATURES=-O
|
||||||
|
- compiler: clang
|
||||||
|
os: osx
|
||||||
|
env: SWIGLANG=go
|
||||||
before_install:
|
before_install:
|
||||||
- date -u
|
- date -u
|
||||||
- uname -a
|
- uname -a
|
||||||
- lsb_release -a
|
# Travis overrides CC environment with compiler predefined values
|
||||||
- sudo apt-get -qq update
|
- if test -n "$SWIG_CC"; then export CC="$SWIG_CC"; 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 -n "$SWIG_CXX"; then export CXX="$SWIG_CXX"; fi
|
||||||
- if test -z "$GCC5"; then sudo apt-get -qq install libboost-dev; fi
|
install:
|
||||||
- if test -n "$GCC5"; then sudo add-apt-repository -y ppa:boost-latest/ppa && sudo apt-get -qq update && sudo apt-get install -qq libboost1.55-dev; fi
|
- if test "$TRAVIS_OS_NAME" = "linux"; then source Tools/travis-linux-install.sh; fi
|
||||||
- if test -z "$SWIGLANG"; then sudo apt-get -qq install yodl; fi
|
- if test "$TRAVIS_OS_NAME" = "osx"; then source Tools/travis-osx-install.sh; 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
|
|
||||||
- if test "$SWIGLANG" = "javascript" -a "$ENGINE" = "node"; then sudo apt-get install -qq rlwrap python-software-properties && echo 'yes' | sudo add-apt-repository ppa:chris-lea/node.js && sudo apt-get -qq update && sudo apt-get install -qq nodejs && sudo npm install -g node-gyp; fi
|
|
||||||
- if test "$SWIGLANG" = "javascript" -a "$ENGINE" = "jsc"; then sudo apt-get install -qq libwebkitgtk-dev; fi
|
|
||||||
- if test "$SWIGLANG" = "javascript" -a "$ENGINE" = "v8"; then sudo apt-get install -qq libv8-dev; fi
|
|
||||||
- if test "$SWIGLANG" = "guile"; then sudo apt-get -qq install guile-2.0-dev; fi
|
|
||||||
- if test "$SWIGLANG" = "lua"; then sudo apt-get -qq install lua5.1 liblua5.1-dev; fi
|
|
||||||
# configure also looks for ocamldlgen, but this isn't packaged. But it isn't used by default so this doesn't matter.
|
|
||||||
- if test "$SWIGLANG" = "ocaml"; then sudo apt-get -qq install ocaml ocaml-findlib; fi
|
|
||||||
- if test "$SWIGLANG" = "octave" -a -z "$VER"; then sudo apt-get -qq install octave3.2 octave3.2-headers; fi
|
|
||||||
- if test "$SWIGLANG" = "octave" -a "$VER"; then sudo add-apt-repository -y ppa:kwwette/octaves && sudo apt-get -qq update && sudo apt-get -qq install liboctave${VER}-dev; fi
|
|
||||||
- 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 && 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") && export CSTD=c11 && export CPPSTD=c++11; 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") && export CSTD=c11 && export CPPSTD=c++11; 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") && export CSTD=c11 && export CPPSTD=c++14; 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") && export CSTD=c11 && export CPPSTD=c++14; fi
|
||||||
|
- ls -la $(which $CC)
|
||||||
|
- ls -la $(which $CXX)
|
||||||
- $CC --version
|
- $CC --version
|
||||||
- $CXX --version
|
- $CXX --version
|
||||||
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
|
|
||||||
- if test -n "$SWIGLANG"; then export cflags=$(Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD) && echo $cflags; fi
|
|
||||||
- if test -n "$SWIGLANG"; then export cxxflags=$(Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD) && echo $cxxflags; fi
|
|
||||||
script:
|
script:
|
||||||
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
|
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
|
||||||
- if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$SWIGLANG$PY3); fi
|
- if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$SWIGLANG$PY3); fi
|
||||||
|
|
@ -135,9 +193,14 @@ script:
|
||||||
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
|
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
|
||||||
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
|
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
|
||||||
- echo 'Installing...' && echo -en 'travis_fold:start:script.2\\r'
|
- echo 'Installing...' && echo -en 'travis_fold:start:script.2\\r'
|
||||||
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
|
# make install doesn't work on os x due to missing yodl2man
|
||||||
|
- if test -z "$SWIGLANG" -a "$TRAVIS_OS_NAME" = "linux"; then sudo make -s install && swig -version && ccache-swig -V; fi
|
||||||
- echo -en 'travis_fold:end:script.2\\r'
|
- echo -en 'travis_fold:end:script.2\\r'
|
||||||
|
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
|
||||||
|
- if test -n "$SWIGLANG"; then cflags=$($TRAVIS_BUILD_DIR/Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD --compiler=$CC) && echo $cflags; fi
|
||||||
|
- if test -n "$SWIGLANG"; then cxxflags=$($TRAVIS_BUILD_DIR/Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD --compiler=$CC) && echo $cxxflags; fi
|
||||||
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
|
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
|
||||||
|
- if test -n "$SWIGLANG"; then make check-$SWIGLANG-enabled; fi
|
||||||
- if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
- if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-examples CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
||||||
- if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
- if test -n "$SWIGLANG"; then make $SWIGJOBS check-$SWIGLANG-test-suite CFLAGS="$cflags" CXXFLAGS="$cxxflags"; fi
|
||||||
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
|
- echo 'Cleaning...' && echo -en 'travis_fold:start:script.3\\r'
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,12 @@ skip-android = test -n "@SKIP_ANDROID@"
|
||||||
# Special errors test-case
|
# Special errors test-case
|
||||||
skip-errors = test -n ""
|
skip-errors = test -n ""
|
||||||
|
|
||||||
|
check-%-enabled:
|
||||||
|
@if $(skip-$*); then \
|
||||||
|
echo skipping $* version; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# CHECK
|
# CHECK
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
def get_cflags(language, std):
|
def get_cflags(language, std, compiler):
|
||||||
if std == None or len(std) == 0:
|
if std == None or len(std) == 0:
|
||||||
std = "gnu89"
|
std = "gnu89"
|
||||||
c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wdeclaration-after-statement"
|
c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wdeclaration-after-statement"
|
||||||
|
|
@ -16,17 +16,20 @@ def get_cflags(language, std):
|
||||||
"perl5":"-Werror " + c_common,
|
"perl5":"-Werror " + c_common,
|
||||||
"php":"-Werror " + c_common,
|
"php":"-Werror " + c_common,
|
||||||
"python":"-Werror " + c_common,
|
"python":"-Werror " + c_common,
|
||||||
|
"r":"-Werror " + c_common,
|
||||||
"ruby":"-Werror " + c_common,
|
"ruby":"-Werror " + c_common,
|
||||||
"scilab":"-Werror " + c_common,
|
"scilab":"-Werror " + c_common,
|
||||||
"tcl":"-Werror " + c_common,
|
"tcl":"-Werror " + c_common,
|
||||||
}
|
}
|
||||||
|
if compiler == 'clang':
|
||||||
|
cflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
||||||
|
|
||||||
if language not in cflags:
|
if language not in cflags:
|
||||||
raise RuntimeError("{} is not a supported language".format(language))
|
raise RuntimeError("{} is not a supported language".format(language))
|
||||||
|
|
||||||
return cflags[language]
|
return cflags[language]
|
||||||
|
|
||||||
def get_cxxflags(language, std):
|
def get_cxxflags(language, std, compiler):
|
||||||
if std == None or len(std) == 0:
|
if std == None or len(std) == 0:
|
||||||
std = "c++98"
|
std = "c++98"
|
||||||
cxx_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type"
|
cxx_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type"
|
||||||
|
|
@ -42,10 +45,13 @@ def get_cxxflags(language, std):
|
||||||
"perl5":"-Werror " + cxx_common,
|
"perl5":"-Werror " + cxx_common,
|
||||||
"php":"-Werror " + cxx_common,
|
"php":"-Werror " + cxx_common,
|
||||||
"python":"-Werror " + cxx_common,
|
"python":"-Werror " + cxx_common,
|
||||||
|
"r":"-Werror " + cxx_common,
|
||||||
"ruby":"-Werror " + cxx_common,
|
"ruby":"-Werror " + cxx_common,
|
||||||
"scilab": cxx_common,
|
"scilab": cxx_common,
|
||||||
"tcl":"-Werror " + cxx_common,
|
"tcl":"-Werror " + cxx_common,
|
||||||
}
|
}
|
||||||
|
if compiler == 'clang':
|
||||||
|
cxxflags["guile"] += " -Wno-attributes" # -Wno-attributes is for clang LLVM 3.5 and bdw-gc < 7.5 used by guile
|
||||||
|
|
||||||
if language not in cxxflags:
|
if language not in cxxflags:
|
||||||
raise RuntimeError("{} is not a supported language".format(language))
|
raise RuntimeError("{} is not a supported language".format(language))
|
||||||
|
|
@ -59,12 +65,15 @@ flags = parser.add_mutually_exclusive_group(required=True)
|
||||||
flags.add_argument('-c', '--cflags', action='store_true', default=False, help='show CFLAGS')
|
flags.add_argument('-c', '--cflags', action='store_true', default=False, help='show CFLAGS')
|
||||||
flags.add_argument('-x', '--cxxflags', action='store_true', default=False, help='show CXXFLAGS')
|
flags.add_argument('-x', '--cxxflags', action='store_true', default=False, help='show CXXFLAGS')
|
||||||
parser.add_argument('-s', '--std', required=False, help='language standard flags for the -std= option')
|
parser.add_argument('-s', '--std', required=False, help='language standard flags for the -std= option')
|
||||||
|
parser.add_argument('-C', '--compiler', required=False, help='compiler used (clang or gcc)')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.cflags:
|
if args.cflags:
|
||||||
print("{}".format(get_cflags(args.language, args.std)))
|
get_flags = get_cflags
|
||||||
elif args.cxxflags:
|
elif args.cxxflags:
|
||||||
print("{}".format(get_cxxflags(args.language, args.std)))
|
get_flags = get_cxxflags
|
||||||
else:
|
else:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
print(get_flags(args.language, args.std, args.compiler))
|
||||||
|
|
|
||||||
96
Tools/travis-linux-install.sh
Executable file
96
Tools/travis-linux-install.sh
Executable file
|
|
@ -0,0 +1,96 @@
|
||||||
|
#!/bin/bash
|
||||||
|
lsb_release -a
|
||||||
|
sudo apt-get -qq update
|
||||||
|
|
||||||
|
if [[ "$CC" == gcc-5 ]]; then
|
||||||
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
|
sudo add-apt-repository -y ppa:boost-latest/ppa
|
||||||
|
sudo apt-get -qq update
|
||||||
|
sudo apt-get install -qq g++-5 libboost1.55-dev
|
||||||
|
else
|
||||||
|
sudo apt-get -qq install libboost-dev
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$SWIGLANG" in
|
||||||
|
"")
|
||||||
|
sudo apt-get -qq install yodl
|
||||||
|
;;
|
||||||
|
"csharp")
|
||||||
|
sudo apt-get -qq install mono-devel
|
||||||
|
;;
|
||||||
|
"d")
|
||||||
|
wget http://downloads.dlang.org/releases/2014/dmd_2.066.0-0_amd64.deb
|
||||||
|
sudo dpkg -i dmd_2.066.0-0_amd64.deb
|
||||||
|
;;
|
||||||
|
"go")
|
||||||
|
# Until configure.ac is fixed
|
||||||
|
go env | sed -e 's/^/export /' > goenvsetup
|
||||||
|
source goenvsetup
|
||||||
|
rm -f goenvsetup
|
||||||
|
;;
|
||||||
|
"javascript")
|
||||||
|
case "$ENGINE" in
|
||||||
|
"node")
|
||||||
|
sudo add-apt-repository -y ppa:chris-lea/node.js
|
||||||
|
sudo apt-get -qq update
|
||||||
|
sudo apt-get install -qq nodejs rlwrap
|
||||||
|
sudo npm install -g node-gyp
|
||||||
|
;;
|
||||||
|
"jsc")
|
||||||
|
sudo apt-get install -qq libwebkitgtk-dev
|
||||||
|
;;
|
||||||
|
"v8")
|
||||||
|
sudo apt-get install -qq libv8-dev
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"guile")
|
||||||
|
sudo apt-get -qq install guile-2.0-dev
|
||||||
|
;;
|
||||||
|
"lua")
|
||||||
|
sudo apt-get -qq install lua5.1 liblua5.1-dev
|
||||||
|
;;
|
||||||
|
"ocaml")
|
||||||
|
# configure also looks for ocamldlgen, but this isn't packaged. But it isn't used by default so this doesn't matter.
|
||||||
|
sudo apt-get -qq install ocaml ocaml-findlib
|
||||||
|
;;
|
||||||
|
"octave")
|
||||||
|
if [[ -z "$VER" ]]; then
|
||||||
|
sudo apt-get -qq install octave3.2 octave3.2-headers
|
||||||
|
else
|
||||||
|
sudo add-apt-repository -y ppa:kwwette/octaves
|
||||||
|
sudo apt-get -qq update
|
||||||
|
sudo apt-get -qq install liboctave${VER}-dev
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"php")
|
||||||
|
sudo apt-get install php5-cli php5-dev
|
||||||
|
;;
|
||||||
|
"python")
|
||||||
|
git clone https://github.com/jcrocholl/pep8.git
|
||||||
|
(
|
||||||
|
cd pep8
|
||||||
|
git checkout tags/1.5.7
|
||||||
|
python ./setup.py build
|
||||||
|
sudo python ./setup.py install
|
||||||
|
)
|
||||||
|
if [[ "$PY3" ]]; then
|
||||||
|
sudo apt-get install -qq python3-dev
|
||||||
|
fi
|
||||||
|
if [[ "$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
|
||||||
|
;;
|
||||||
|
"r")
|
||||||
|
sudo apt-get -qq install r-base
|
||||||
|
;;
|
||||||
|
"scilab")
|
||||||
|
sudo apt-get -qq install scilab
|
||||||
|
;;
|
||||||
|
"tcl")
|
||||||
|
sudo apt-get -qq install tcl8.4-dev
|
||||||
|
;;
|
||||||
|
esac
|
||||||
23
Tools/travis-osx-install.sh
Executable file
23
Tools/travis-osx-install.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/bin/bash
|
||||||
|
sw_vers
|
||||||
|
brew update
|
||||||
|
brew list
|
||||||
|
brew install pcre
|
||||||
|
# brew install boost
|
||||||
|
case "$SWIGLANG" in
|
||||||
|
"csharp")
|
||||||
|
brew install https://s3.amazonaws.com/travisbuilds.swig.org/mono.rb
|
||||||
|
;;
|
||||||
|
"guile")
|
||||||
|
Tools/brew-install guile
|
||||||
|
;;
|
||||||
|
"lua")
|
||||||
|
brew install lua
|
||||||
|
;;
|
||||||
|
"python")
|
||||||
|
if [[ "$PY3" ]]; then
|
||||||
|
brew install python3
|
||||||
|
brew list -v python3
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Loading…
Add table
Add a link
Reference in a new issue