sudo: false
language: rust
rust:
  - nightly
  - beta
  - stable
env:
  global:
    - CC=gcc-4.8
    - CXX=g++-4.8
    - export PATH="$PATH:$HOME/bin"
    - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/lib"
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - gcc-4.8
      - g++-4.8
install:
  - curl -O https://capnproto.org/capnproto-c++-0.5.3.tar.gz
  - tar zxf capnproto-c++-0.5.3.tar.gz
  - cd capnproto-c++-0.5.3
  - ./configure --prefix=$HOME
  - make -j3
  - make install
  - cd ../
script:
  - cargo build
  - cargo doc
  - cd test
  - cargo test
  - cd ..
  - cd examples/calculator
  - ./test_client_and_server.bash
  - cd ..
  - cd pubsub
  - cargo build

sudo: false
language: rust
rust:
  - nightly
  - beta
  - stable
env:
  global:
    - CC=gcc-4.8
    - CXX=g++-4.8
    - export PATH="$PATH:$HOME/bin"
    - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/lib"
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - gcc-4.8
      - g++-4.8
install:
  - curl -O https://capnproto.org/capnproto-c++-0.5.3.tar.gz
  - tar zxf capnproto-c++-0.5.3.tar.gz
  - cd capnproto-c++-0.5.3
  - ./configure --prefix=$HOME
  - make -j3
  - make install

  # On Debian, the 'capnproto' package currently does not include c++.capnp. Test here that we don't need it.
  - ls -R $HOME/include
  - rm -rf $HOME/include

  - cd ../
script:
  - cargo build
  - cargo doc
  - cd test
  - cargo test
  - cd ..
  - cd examples/calculator
  - ./test_client_and_server.bash
  - cd ..
  - cd pubsub
  - cargo build

Test that we don't need c++.capnp to be installed.
Test that we don't need c++.capnp to be installed.
