os:
- linux
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-8
    - g++-8
    - gfortran-8
  homebrew:
    packages:
    - gnu-tar
  global:
    - MAKEFLAGS="-j 2"
matrix:
  include:
  - os: osx
    osx_image: xcode9.4
    env:
    - MODE=build
dist: xenial
sudo: required
latex: true
language: r
git:
  submodules: false
install:
- mkdir -p ~/.R
- ./util/travis/install-$TRAVIS_OS_NAME
script: "./util/travis/script"
env:
  matrix:
  - MODE=test IMX_OPT_ENGINE=NPSOL
  - MODE=test IMX_OPT_ENGINE=CSOLNP
  - MODE=test IMX_OPT_ENGINE=SLSQP
  - MODE=cran-check
branches:
  except:
  - stable   # already tested
before_deploy:
- openssl aes-256-cbc -K $encrypted_45bb258eabb3_key -iv $encrypted_45bb258eabb3_iv -in util/travis/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
  provider: script
  skip_cleanup: true
  script: ./util/travis/deploy
  on: master

os:
- linux
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-8
    - g++-8
    - gfortran-8
  homebrew:
    packages:
    - gnu-tar
  global:
    - MAKEFLAGS="-j 2"
matrix:
  include:
  - os: osx
    osx_image: xcode9.4
    env:
    - MODE=build
    latex: false
dist: xenial
sudo: required
latex: true
language: r
git:
  submodules: false
install:
- mkdir -p ~/.R
- ./util/travis/install-$TRAVIS_OS_NAME
script: "./util/travis/script"
env:
  matrix:
  - MODE=test IMX_OPT_ENGINE=NPSOL
  - MODE=test IMX_OPT_ENGINE=CSOLNP
  - MODE=test IMX_OPT_ENGINE=SLSQP
  - MODE=cran-check
branches:
  except:
  - stable   # already tested
before_deploy:
- openssl aes-256-cbc -K $encrypted_45bb258eabb3_key -iv $encrypted_45bb258eabb3_iv -in util/travis/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
  provider: script
  skip_cleanup: true
  script: ./util/travis/deploy
  on: master

Revert "Maybe need latex for os/x now?"
Revert "Maybe need latex for os/x now?"

This reverts commit 661d41ff60857a32fba196efe0b334e1a9a2e968.
