1. Michael Granger
  2. ruby-pg

Source

ruby-pg / .travis.yml

language: ruby
rvm:
  - "1.8.7"
#   - "1.9.2"
  - "1.9.3"
  - "2.0.0"
#   - jruby-18mode # JRuby in 1.8 mode
#   - jruby-19mode # JRuby in 1.9 mode
  - rbx-18mode
  - rbx-19mode
env:
  - "PGVERSION=9.2.4-1-linux-x64 PATH=\"/opt/PostgreSQL/9.2/bin:$PATH\""
  - "PGVERSION=8.4.17-1-linux-x64 PATH=\"/opt/PostgreSQL/8.4/bin:$PATH\""
  - "PGCROSS=true"
matrix:
  # Test cross compilation only with 1.8.7
  exclude:
    - rvm: 1.9.2
      env: "PGCROSS=true"
    - rvm: 1.9.3
      env: "PGCROSS=true"
    - rvm: 2.0.0
      env: "PGCROSS=true"
    - rvm: jruby-18mode
      env: "PGCROSS=true"
    - rvm: jruby-19mode
      env: "PGCROSS=true"
    - rvm: rbx-18mode
      env: "PGCROSS=true"
    - rvm: rbx-19mode
      env: "PGCROSS=true"
  allow_failures:
    - rvm: rbx-18mode # one test fails because GVL unblocking function is not called by Rubinius core
    - rvm: rbx-19mode # one test fails because GVL unblocking function is not called by Rubinius core
before_install:
  - gem install hoe rspec;
  - gem install rake-compiler --pre;
  # Download and install postgresql version to test against in /opt (for non-cross compile only)
  - "if [ -z \"$PGCROSS\" ]; then
      wget http://get.enterprisedb.com/postgresql/postgresql-$PGVERSION.run &&
      chmod +x postgresql-$PGVERSION.run &&
      sudo ./postgresql-$PGVERSION.run --mode unattended --unattendedmodeui minimal;
    fi"
  # Install compiler and ruby versions for cross compile (as seperate tasks to not exceed timeout limits)
  - "if [ -n \"$PGCROSS\" ]; then sudo apt-get install gcc-mingw-w64-i686 binutils-mingw-w64-i686 gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64; fi"
  - "if [ -n \"$PGCROSS\" ]; then rake-compiler cross-ruby VERSION=1.8.7-p371; fi"
  - "if [ -n \"$PGCROSS\" ]; then rake-compiler cross-ruby VERSION=2.0.0-p0 HOST=x86_64-w64-mingw32; fi"
script: "if [ -z \"$PGCROSS\" ]; then rake compile test; else rake cross compile; fi"