Merge branch 'travis-ruby2.3'
* travis-ruby2.3: Disable tests broken in python 2.4 and 2.5 Remove Travis 'gem pristine --all' Fix Travis Ruby gem pristine warnings Improve Ruby configure detection when multiple versions installed Use set -e in Travis scripts to ensure the scripts fail on error Travis: ensure the requested language version is being tested Add ruby-2.3 testing to Travis
This commit is contained in:
commit
8dcbbe8b6c
5 changed files with 45 additions and 6 deletions
|
|
@ -98,6 +98,9 @@ matrix:
|
|||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=ruby
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=ruby VER=2.3
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=scilab
|
||||
|
|
@ -162,6 +165,10 @@ matrix:
|
|||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=python SWIG_FEATURES=-O
|
||||
# Not quite working yet
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=ruby VER=2.3
|
||||
before_install:
|
||||
- date -u
|
||||
- uname -a
|
||||
|
|
@ -181,7 +188,7 @@ install:
|
|||
- $CXX --version
|
||||
script:
|
||||
- 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-$WITHLANG); fi
|
||||
- echo "${CONFIGOPTS[@]}"
|
||||
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
|
||||
- echo -en 'travis_fold:end:script.1\\r'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import ctypes
|
||||
import sys
|
||||
from primitive_types import *
|
||||
|
||||
|
|
@ -443,6 +442,11 @@ if v != 4:
|
|||
# Check the bounds for converting various types
|
||||
#
|
||||
|
||||
# ctypes not available until 2.5
|
||||
if sys.version_info[0:2] <= (2, 4):
|
||||
sys.exit(0)
|
||||
import ctypes
|
||||
|
||||
# Get the minimum and maximum values that fit in signed char, short, int, long, and long long
|
||||
overchar = 2 ** 7
|
||||
while ctypes.c_byte(overchar).value > 0:
|
||||
|
|
@ -602,5 +606,6 @@ def checkType(name, maxfunc, maxval, minfunc, minval, echofunc):
|
|||
raise RuntimeError, "bad " + name + " typemap"
|
||||
|
||||
# sys.maxsize is the largest value supported by Py_ssize_t, which should be the same as ptrdiff_t
|
||||
checkType("ptrdiff_t", get_ptrdiff_max, sys.maxsize, get_ptrdiff_min, -(sys.maxsize + 1), ptrdiff_echo)
|
||||
checkType("size_t", get_size_max, (2 * sys.maxsize) + 1, get_size_min, 0, size_echo)
|
||||
if sys.version_info[0:2] >= (2, 6):
|
||||
checkType("ptrdiff_t", get_ptrdiff_max, sys.maxsize, get_ptrdiff_min, -(sys.maxsize + 1), ptrdiff_echo)
|
||||
checkType("size_t", get_size_max, (2 * sys.maxsize) + 1, get_size_min, 0, size_echo)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e # exit on failure
|
||||
|
||||
lsb_release -a
|
||||
sudo apt-get -qq update
|
||||
|
||||
|
|
@ -11,6 +14,8 @@ else
|
|||
sudo apt-get -qq install libboost-dev
|
||||
fi
|
||||
|
||||
WITHLANG=$SWIGLANG
|
||||
|
||||
case "$SWIGLANG" in
|
||||
"") ;;
|
||||
"csharp")
|
||||
|
|
@ -75,16 +80,27 @@ case "$SWIGLANG" in
|
|||
if [[ "$PY3" ]]; then
|
||||
sudo apt-get install -qq python3-dev
|
||||
fi
|
||||
WITHLANG=$SWIGLANG$PY3
|
||||
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}");
|
||||
WITHLANG=$SWIGLANG$PY3=$SWIGLANG$VER
|
||||
fi
|
||||
;;
|
||||
"r")
|
||||
sudo apt-get -qq install r-base
|
||||
;;
|
||||
"ruby")
|
||||
if [[ "$VER" ]]; then
|
||||
sudo apt-get -qq install python-software-properties
|
||||
sudo add-apt-repository -y ppa:brightbox/ruby-ng
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -qq install ruby2.3 ruby2.3-dev
|
||||
# sudo gem pristine --all # Results in: You don't have write permissions for the /var/lib/gems/2.3.0 directory
|
||||
WITHLANG=$SWIGLANG=$SWIGLANG$VER
|
||||
fi
|
||||
;;
|
||||
"scilab")
|
||||
sudo apt-get -qq install scilab
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e # exit on failure
|
||||
|
||||
sw_vers
|
||||
brew update
|
||||
brew list
|
||||
brew install pcre
|
||||
# brew install boost
|
||||
|
||||
WITHLANG=$SWIGLANG
|
||||
|
||||
case "$SWIGLANG" in
|
||||
"csharp")
|
||||
brew install https://s3.amazonaws.com/travisbuilds.swig.org/mono.rb
|
||||
|
|
@ -15,6 +21,7 @@ case "$SWIGLANG" in
|
|||
brew install lua
|
||||
;;
|
||||
"python")
|
||||
WITHLANG=$SWIGLANG$PY3
|
||||
if [[ "$PY3" ]]; then
|
||||
brew install python3
|
||||
brew list -v python3
|
||||
|
|
|
|||
|
|
@ -1788,6 +1788,7 @@ AC_MSG_CHECKING(for Ruby header files)
|
|||
if test -n "$RUBY"; then
|
||||
# Try Ruby1.9+ first
|
||||
RUBYDIR=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["rubyhdrdir"]] || $rubyhdrdir') 2>/dev/null`
|
||||
RUBYARCHHDRDIR=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["rubyarchhdrdir"]] || $rubyarchhdrdir') 2>/dev/null`
|
||||
if test x"$RUBYDIR" = x"" || test x"$RUBYDIR" = x"nil"; then
|
||||
RUBYDIR=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["archdir"]] || $archdir') 2>/dev/null`
|
||||
else
|
||||
|
|
@ -1800,6 +1801,8 @@ if test -n "$RUBY"; then
|
|||
if test -r $i/ruby.h; then
|
||||
if test x"$RUBYARCH" = x""; then
|
||||
RUBYINCLUDE="-I$i"
|
||||
elif test -n "$RUBYARCHHDRDIR"; then
|
||||
RUBYINCLUDE="-I$i -I$RUBYARCHHDRDIR"
|
||||
else
|
||||
RUBYINCLUDE="-I$i -I$i/$RUBYARCH"
|
||||
fi
|
||||
|
|
@ -1814,9 +1817,10 @@ if test -n "$RUBY"; then
|
|||
# Find library and path for linking.
|
||||
AC_MSG_CHECKING(for Ruby library)
|
||||
RUBYLIB=""
|
||||
rb_archlibdir=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["archlibdir"]]') 2>/dev/null`
|
||||
rb_libdir=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["libdir"]]') 2>/dev/null`
|
||||
rb_bindir=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["bindir"]]') 2>/dev/null`
|
||||
dirs="$dirs $rb_libdir $rb_bindir"
|
||||
dirs="$dirs $rb_archlibdir $rb_libdir $rb_bindir"
|
||||
|
||||
rb_libruby=`($RUBY -rrbconfig -e 'print RbConfig::CONFIG[["LIBRUBY_A"]]') 2>/dev/null`
|
||||
RUBYLINK=`($RUBY -rrbconfig -e '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue