.travis.yml 1.36 KB
Newer Older
1 2
# This script is adapted from https://github.com/AdaCore/Ada_Drivers_Library
# Thanks to AdaCore for providing it
3

4 5
# We are using Python 2.7 to run the testsuite
language: python
6 7
#python:
#  - "2.7"
8 9 10 11 12 13 14 15 16

# Global variables
env:
  global:
    - TOOLS_DIR=$HOME/build_tools
    - GNAT_TAR_PATH=$TOOLS_DIR/gnat-gpl-2016-x86_64-linux-bin.tar.gz

os:
  - linux
yoogx's avatar
yoogx committed
17
  - osx
18 19 20 21 22 23 24 25 26 27

# Cache directory that allows us to not download GNAT GPL every time, speeding
# up the process.
cache:
  directories:
  - $HOME/build_tools

install:
  # Check if the GNAT package is already available in the cache directory. If
  # not, download it.
yoogx's avatar
yoogx committed
28 29
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then test -f  $GNAT_TAR_PATH ||( mkdir -p $TOOLS_DIR && wget http://mirrors.cdn.adacore.com/art/5739cefdc7a447658e0b016b -O $GNAT_TAR_PATH); fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then test -f  $GNAT_TAR_PATH ||( mkdir -p $TOOLS_DIR && wget http://mirrors.cdn.adacore.com/art/573a396cc7a447658d00e430 -O $GNAT_TAR_PATH); fi
30 31 32 33 34

  # Extract GNAT from its package
  - tar -xf $GNAT_TAR_PATH

  # Add GNAT to $PATH
yoogx's avatar
yoogx committed
35
  - export PATH=$PWD/gnat-gpl-2016-x86_64-linux-bin/bin/:$PWD/gnat-gpl-2016-x86_64-darwin-bin/bin/:$PATH
36 37

script:
yoogx's avatar
yoogx committed
38 39 40 41
  # Show GNAT version for the record
  - gcc --version
  - gnatls -v

42
  # Just build
yoogx's avatar
yoogx committed
43
  - git clone https://github.com/OpenAADL/ocarina-build.git ; ( cd ocarina-build ; ./build_ocarina.sh --scenario=travis-ci )