language: c

before_install:
  - sudo apt-get install python-protobuf python-crypto
  - sudo apt-get install linux-headers-$(uname -r)

before_script:
  - git clone https://github.com/01org/linux-sgx-driver.git -b sgx_driver_$ISGX_DRIVER_VERSION

script:
  - make
  - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make SGX=1
  - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make DEBUG=1
  - cd $TRAVIS_BUILD_DIR/Pal/src && make clean && make SGX=1 DEBUG=1
  - cd $TRAVIS_BUILD_DIR/Pal/src/host/Linux-SGX/sgx-driver && make


matrix:
  include:
    - os: linux
      dist: trusty
      env:
        - ISGX_DRIVER_PATH=$TRAVIS_BUILD_DIR/linux-sgx-driver
        - ISGX_DRIVER_VERSION=1.9
