language: rust
os:
- linux
- osx
rust:
- stable
- beta
cache:
bundler: true
directories:
- /home/travis/.cargo
before_cache:
- rm -rf /home/travis/.cargo/registry
before_install:
- . scripts/travis_ci/install_ruby
- ruby --version
- ruby -e 'require "pp"; pp RbConfig::CONFIG'
- rustc -Vv
- cargo -Vv
matrix:
allow_failures:
- rust: beta
- rust: nightly
- env: RUBY_STATIC=true BUILD_RUBY_VERSION=2.6.3
- os: windows
rust: stable
env: BUILD_RUBY_VERSION=2.6.3
- os: windows
rust: stable
env: RUBY_STATIC=true BUILD_RUBY_VERSION=2.6.3
include:
- os: linux
rust: stable
env: RUBY_THREADING=true BUILD_RUBY_VERSION=2.6.3
script:
- |
export WORKING_DIR=`pwd`
echo "Running Eval Example"
cargo run --example eval "a=5;b=9;puts a+b"
echo "Running Ruby Example"
cd "$WORKING_DIR/examples/rutie_ruby_example"
gem install bundler
bundle install
bundle exec rake
echo "Running Ruby GVL Example"
cd "$WORKING_DIR/examples/rutie_ruby_gvl_example"
gem install bundler
bundle install
bundle exec rake
echo "Running Rust Example"
cd "$WORKING_DIR/examples/rutie_rust_example"
export LD_LIBRARY_PATH=`ruby -e "puts RbConfig::CONFIG['libdir']"`
cargo test
- os: osx
rust: stable
env: RUBY_THREADING=true BUILD_RUBY_VERSION=2.6.3
script:
- |
export WORKING_DIR=`pwd`
echo "Running Eval Example"
cargo run --example eval "a=5;b=9;puts a+b"
echo "Running Ruby Example"
cd "$WORKING_DIR/examples/rutie_ruby_example"
gem install bundler
bundle install
bundle exec rake
echo "Running Ruby GVL Example"
cd "$WORKING_DIR/examples/rutie_ruby_gvl_example"
gem install bundler
bundle install
bundle exec rake
echo "Running Rust Example"
cd "$WORKING_DIR/examples/rutie_rust_example"
export DYLD_LIBRARY_PATH=`ruby -e "puts RbConfig::CONFIG['libdir']"`
cargo test
- os: linux
rust: stable
env: RUBY_STATIC=true BUILD_RUBY_VERSION=2.6.3
- os: osx
rust: stable
env: RUBY_STATIC=true BUILD_RUBY_VERSION=2.6.3
- os: windows
rust: stable
env: BUILD_RUBY_VERSION=2.6.3
- os: windows
rust: stable
env: RUBY_STATIC=true BUILD_RUBY_VERSION=2.6.3
before_script:
- export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
script:
- |
cargo build -vv &&
cargo test -vv
after_script:
- cat target/debug/build/rutie-*/output
- cat target/debug/build/rutie-*/stderr
env:
global:
- RUST_BACKTRACE=full
- CI_STDERR_LOG=true
matrix:
- BUILD_RUBY_VERSION: 2.4.6
- BUILD_RUBY_VERSION: 2.5.5
- BUILD_RUBY_VERSION: 2.6.3