# Origin: https://github.com/ah-/rdkafka-dotnet

language: csharp
sudo: required
dist: trusty

os:
   - osx
   - linux

env:
   - RUNTIME=mono
   - RUNTIME=coreclr

# TODO on linux: install http://docs.confluent.io/2.0.0/installation.html#installation-apt

install:
   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libunwind8; fi
   - curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
   - dnvm upgrade
   - dnvm install -r $RUNTIME 1.0.0-rc1-update1
   - dnvm use -r $RUNTIME 1.0.0-rc1-update1
   - dnu restore

script:
   - ./build/copy-runtimes.sh
   - if [ "$RUNTIME" == "coreclr" ]; then export FRAMEWORK="--framework dotnet5.4"; fi
   - dnu build ./src/RdKafka/project.json $FRAMEWORK
   - dnu pack ./src/RdKafka/project.json $FRAMEWORK
   - dnx -p ./test/RdKafka.Tests/ test

# Origin: https://github.com/ah-/rdkafka-dotnet

language: csharp
sudo: required
dist: trusty

os:
   - osx
   - linux

env:
   - RUNTIME=mono
   - RUNTIME=coreclr

# TODO on linux: install http://docs.confluent.io/2.0.0/installation.html#installation-apt

install:
   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then git glone https://github.com/edenhill/librdkafka; fi
   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then pushd librdkafka && ./configure && make && sudo make install && popd; fi
   - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install libunwind8; fi
   - curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
   - dnvm upgrade
   - dnvm install -r $RUNTIME 1.0.0-rc1-update1
   - dnvm use -r $RUNTIME 1.0.0-rc1-update1
   - dnu restore

script:
   - ./build/copy-runtimes.sh
   - if [ "$RUNTIME" == "coreclr" ]; then export FRAMEWORK="--framework dotnet5.4"; fi
   - dnu build ./src/RdKafka/project.json $FRAMEWORK
   - dnu pack ./src/RdKafka/project.json $FRAMEWORK
   - dnx -p ./test/RdKafka.Tests/ test

Build and install librdkafka on linux
Build and install librdkafka on linux
