sudo: required

dist: bionic

env:
  global:
    - secure: "lqkL5SCM/CBwgVb1GWoOngpojsa0zCSGcvF0O3/45rBT1EpNYtQ4LRJ1+XcHi126vdfGoim/8i7AQhn5eOgmZI8yAPBeoUZ5zSrejD3RUpXr2rXocsvRRP25Z4mIuAGHD9VAHtvTdhBZRVV818W02pYduSzAeaY61q/lU3xmWsE="
    - secure: "mzms6X8uvdhRWxkPBMwx+mDl3d+V1kUpZa7UgjT+dr4rvZMzvKtjKp/O0JZZVogdgZjUZf444B98/7AvWdSkGdkfz2QdmhWmXzNPfNuHtmfCYMdijsgFIGLuD3GviFL/rBiM2vgn32T3QqFiEJiC5StparnnXimPTc9TpXQRq5c="


jobs:
  include:
    - os: linux
      arch: s390x
      env: TASK=s390x_test

# dependent brew packages
# the dependencies from homebrew is installed manually from setup script due to outdated image from travis.
addons:
  homebrew:
    update: false
  apt:
    packages:
      - unzip

before_install:
  - source tests/travis/travis_setup_env.sh

install:
  - source tests/travis/setup.sh

script:
  - tests/travis/run_test.sh

cache:
  directories:
    - ${HOME}/.cache/usr
    - ${HOME}/.cache/pip

before_cache:
  - tests/travis/travis_before_cache.sh

after_failure:
  - tests/travis/travis_after_failure.sh

after_success:
  - tree build
  - bash <(curl -s https://codecov.io/bash) -a '-o src/ src/*.c'

notifications:
  email:
    on_success: change
    on_failure: always
