# Support for Travis CI -- https://travis-ci.org/upx/upx/builds
# Copyright (C) Markus Franz Xaver Johannes Oberhumer

sudo: false
os: linux
dist: trusty
language: cpp

notifications: { email: { on_success: never, on_failure: change } }

# Ubuntu 12.04 LTS "Precise"
.ubuntu_precise_toolchain_sources: &PS
  - ubuntu-toolchain-r-test
# llvm-toolchain-precise has been disabled 2018-08-28 - see https://github.com/travis-ci/apt-source-safelist/commit/e9d632eb79c7b733b3bfe722356e892ab8e06059
# see TB_OS_linux_precise_llvm below
# - llvm-toolchain-precise-3.5
# - llvm-toolchain-precise-3.6
# - llvm-toolchain-precise-3.7
# - llvm-toolchain-precise-3.8

# Ubuntu 14.04 LTS "Trusty"
.ubuntu_trusty_toolchain_sources: &TS
  - ubuntu-toolchain-r-test
  - llvm-toolchain-trusty-3.9
  - llvm-toolchain-trusty-4.0
  - llvm-toolchain-trusty-5.0
  - llvm-toolchain-trusty-6.0

env:
  global:
    # TB_LEVEL >= 1: gcc-7, gcc-8, clang-6, xcode10
    # TB_LEVEL >= 2: gcc-4.4, gcc-4.8, gcc-6, clang-3.4
    # TB_LEVEL >= 3: gcc-4.6, gcc-5, clang-3.9, xcode9
    # TB_LEVEL >= 4: include sanitize/scan-build/valgrind builds
    # TB_LEVEL >= 5: cross-compilers running testsuite under qemu/wine
    # TB_LEVEL >= 6: all other compilers & builds
    - TB_LEVEL=5
    - TB_OS_linux=1 TB_OS_osx=1
    - TB_OS_linux_precise_llvm=0
    - CROSS= C= B= T= X=
    - secure: "YXHLXK+CM5d8yELIUSSs+P0/CoefClO7/AUX1oBj5W75g+YzR5uS2doVsB8UH8S8/GdNxk4P9Jgn4EiEVnjfGgn2eAD9MVpDPIxyJs5vI+5G77asq3QNdSl6QFv3O9I/6yBoVCewgPFPqsMd7Yvs/Ea3LcQkqalVhrC8ybYtmfs6VL2w33gn2J3b3TCn/s21L0ijklM0xvP1GNMDtuUpTSish5wvGOHE/91rwtdUDbJR8u31QY7fTASDiNnL/7ihgEIZ5XxpDYXviX1GC+nemhX1fWpmVmuT8m30Ruodi0yJVGASw9i2SaKv/VX/fJ/w2vlCfspL5LMZKkVLlfpIo3mQGqmMHFxv7mNy+hRu50ptoWNSkWArcqifwveh2liHUpl4jTvWaVll5Tw5VUGJhAUdzCTnqLIbWFnKIgCedL3iRFi4+EbyWNxel8lFESMOTDZFfJG5yEiDJbgbLsUaT2GmrsOphwAG7zDcZzvYTdjg/lF4Wh0MUnQJ+0MhDpii8Ahjp49lAPdw8uRQyyY7d7ksYKXVIkbgl6dRCC5vZSPucJiFjq2BClqIoEmzZPvHveDbovzFkNhJX9tFLrHLcXbPPcegww1FGoQ3wBM6JwJ+TvSD6N4OdCmou05aDuuQeznHi3GxOScjGwxdMIU28fdJDCTDg2rOihm22kHVajo="
    - secure: "JpSv3+QRmHcfN/bmT3mVkqET44NCPhM/qpcUssCVXnd2GW0qWURoyPHzVMn/gbeAkUjR6djtN3OzJ+M181QmlmTmE26pZC9Q6r1buNDWdkIH1FcpMCa67BBAjmq+yDwulDtvCMv0lbz60v57lzHBOLczF3yMxBVTjXxt1RsrzDLHzzVaDR5lEe+sQUNeRL7Vaq8crimPNTr4ZhMe59eweTO/3AWovuSPf250k1flfv7I8audZgrVZdbVKvj5C3Sziy1AGXcu8mDfET9/Ya2XBCQHWODjiKlnhSxqthhP3gQuacaLjpS2FjvQlamd+I9x6BBoLSeNbiXD9vgCydDUKvmUrU+zQs64U1hHk9WZWVC19kG7lTtTdanGDIUlIUtFZgqE4AQpJaIUWkUmHGyHi61JMvduzX21eL5c5j9DoJteX42FPb1n3xK/JSnUkLMpbFdQuy5inhzefhDfeNzaYxt8nPwHnJqrF73SW4PLDKeRyzvg/P+zqcou8nXrHfA1z9/FlnYzf7Qc9meai9Q/JARX3Q1ZKu5uyG+RuBLe2POq0192w6pflTr1ZlLJsKNSc1147PviKfmpla1lg3/6uVzMp5tgwbve/hx9SDXiRueGttKw/ymsY662+8G24NRKo4fxNklWFHaB4owM84edDzXDckPXbPgue8/HQT8BFio="

matrix:
  fast_finish: true
  include:
    - if: 1 = 1
      os: linux
      dist: trusty
      compiler: gcc
      env: X=rebuild-stubs
      addons: { apt: { packages: [ "g++-multilib", "lib32z1" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.4-m32
      addons: { apt: { sources: *PS, packages: [ "g++-4.4-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.4-m64
      addons: { apt: { sources: *PS, packages: [ "g++-4.4" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.5-m32
      addons: { apt: { sources: *PS, packages: [ "g++-4.5-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.5-m64
      addons: { apt: { sources: *PS, packages: [ "g++-4.5" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.6-m32
      addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.6-m64

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.7-m32
      addons: { apt: { sources: *PS, packages: [ "g++-4.7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: C=gcc-4.7-m64
      addons: { apt: { sources: *PS, packages: [ "g++-4.7" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-4.8-m32
      addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-4.8-m64
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-4.8-mx32
      addons: { apt: { packages: [ "g++-multilib", "libx32stdc++-4.8-dev" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-4.9-m32
      addons: { apt: { sources: *TS, packages: [ "g++-4.9-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-4.9-m64
      addons: { apt: { sources: *TS, packages: [ "g++-4.9" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-5-m32
      addons: { apt: { sources: *TS, packages: [ "g++-5-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-5-m64
      addons: { apt: { sources: *TS, packages: [ "g++-5" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-6-m32
      addons: { apt: { sources: *TS, packages: [ "g++-6-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-6-m64
      addons: { apt: { sources: *TS, packages: [ "g++-6" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-7-m32
      addons: { apt: { sources: *TS, packages: [ "g++-7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-7-m64
      addons: { apt: { sources: *TS, packages: [ "g++-7" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m32
      addons: { apt: { sources: *TS, packages: [ "g++-8-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m64
      addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m32 B=debug
      addons: { apt: { sources: *TS, packages: [ "g++-8-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m64 B=debug
      addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      # must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
      sudo: true
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m64 B=debug+sanitize
      addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      # must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
      sudo: true
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m64 B=sanitize
      addons: { apt: { sources: *TS, packages: [ "g++-8" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      os: linux
      dist: trusty
      compiler: gcc
      env: C=gcc-8-m64 B=valgrind T=valgrind
      addons: { apt: { sources: *TS, packages: [ "g++-8", valgrind ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.4-m32
      addons: { apt: { packages: [ "g++-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[2-9]$/
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.4-m64

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.5-m32
      addons: { apt: { sources: *PS, packages: [ "clang-3.5", "g++-6-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.5-m64
      addons: { apt: { sources: *PS, packages: [ "clang-3.5" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.6-m32
      addons: { apt: { sources: *PS, packages: [ "clang-3.6", "g++-6-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.6-m64
      addons: { apt: { sources: *PS, packages: [ "clang-3.6" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.7-m32
      addons: { apt: { sources: *PS, packages: [ "clang-3.7", "g++-6-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.7-m64
      addons: { apt: { sources: *PS, packages: [ "clang-3.7" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.8-m32
      addons: { apt: { sources: *PS, packages: [ "clang-3.8", "g++-6-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/ AND env(TB_OS_linux_precise_llvm) = 1
      os: linux
      dist: precise
      compiler: clang
      env: C=clang-3.8-m64
      addons: { apt: { sources: *PS, packages: [ "clang-3.8" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-3.9-m32
      addons: { apt: { sources: *TS, packages: [ "clang-3.9", "g++-7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-3.9-m64
      addons: { apt: { sources: *TS, packages: [ "clang-3.9" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-4.0-m32
      addons: { apt: { sources: *TS, packages: [ "clang-4.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-4.0-m64
      addons: { apt: { sources: *TS, packages: [ "clang-4.0" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-5.0-m32
      addons: { apt: { sources: *TS, packages: [ "clang-5.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-5.0-m64
      addons: { apt: { sources: *TS, packages: [ "clang-5.0" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m32
      addons: { apt: { sources: *TS, packages: [ "clang-6.0", "g++-7-multilib", "zlib1g-dev:i386" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m64
      addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      # must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
      sudo: true
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m64 B=debug+sanitize
      addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      # must use sudo CAP_SYS_PTRACE for sanitize - see https://github.com/travis-ci/travis-ci/issues/9033
      sudo: true
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m64 B=sanitize
      addons: { apt: { sources: *TS, packages: [ "clang-6.0" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m64 B=debug+scan-build
      addons: { apt: { sources: *TS, packages: [ "clang-6.0", "clang-tools-6.0" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[4-9]$/
      os: linux
      dist: trusty
      compiler: clang
      env: C=clang-6.0-m64 B=scan-build
      addons: { apt: { sources: *TS, packages: [ "clang-6.0", "clang-tools-6.0" ] } }

    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: CROSS=arm-linux-gnueabi C=gcc-4.6 T=qemu
      addons: { apt: { packages: [ "g++-arm-linux-gnueabi", "qemu-user" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: CROSS=arm-linux-gnueabihf C=gcc-4.6 T=qemu
      addons: { apt: { packages: [ "g++-arm-linux-gnueabihf", "qemu-user" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: CROSS=i386-w64-mingw32 C=gcc-4.6 T=wine
      addons: { apt: { packages: [ "binutils-mingw-w64-i686", "g++-mingw-w64-i686", "wine" ] } }
    - if: env(TB_OS_linux) = 1 AND env(TB_LEVEL) =~ /^[5-9]$/
      os: linux
      dist: precise
      compiler: gcc
      env: CROSS=x86_64-w64-mingw32 C=gcc-4.6 T=wine
      addons: { apt: { packages: [ "binutils-mingw-w64-x86-64", "g++-mingw-w64-x86-64", "wine" ] } }

    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode6.4
      compiler: clang
      # must use debug build or else we get "ld: internal error: atom not found" when linking
      env: C=clang-602-m32 B=debug
    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode6.4
      compiler: clang
      # must use debug build or else we get "ld: internal error: atom not found" when linking
      env: C=clang-602-m64 B=debug

    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode7.3
      compiler: clang
      env: C=clang-703-m32
    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode7.3
      compiler: clang
      env: C=clang-703-m64

    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode8.3
      compiler: clang
      env: C=clang-802-m32
    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[6-9]$/
      os: osx
      osx_image: xcode8.3
      compiler: clang
      env: C=clang-802-m64

    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: osx
      osx_image: xcode9.4
      compiler: clang
      env: C=clang-902-m32
    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[3-9]$/
      os: osx
      osx_image: xcode9.4
      compiler: clang
      env: C=clang-902-m64

    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: osx
      osx_image: xcode10
      compiler: clang
      env: C=clang-1000-m32
    - if: env(TB_OS_osx) = 1 AND env(TB_LEVEL) =~ /^[1-9]$/
      os: osx
      osx_image: xcode10
      compiler: clang
      env: C=clang-1000-m64

install:
  - uname -a; pwd; id; umask
  - cat /etc/os-release || true
  - |
    cd /
    if [[ $TRAVIS_OS_NAME == linux ]]; then
      if [[ $B =~ (^|\+)coverage($|\+) ]]; then
        travis_retry pip install --user cpp-coveralls
      fi
    fi
    if [[ $TRAVIS_OS_NAME == osx ]]; then
      if ! gsha256sum </bin/sh >/dev/null 2>/dev/null; then travis_retry brew install coreutils; fi
      if [[ $B =~ (^|\+)coverage($|\+) ]]; then
        travis_retry brew install lcov
        travis_retry pip install --user cpp-coveralls
      fi
    fi
  - git --version && bash --version
  - umask 022; cd $TRAVIS_BUILD_DIR && mkdir -p ../deps ../build/travis
  - cd ../deps && travis_retry wget -q -O - https://github.com/upx/upx/releases/download/v3.00/ucl-1.03.tar.xz | tar -xJ
  - cd ../deps && travis_retry wget -q -O - https://github.com/upx/upx/releases/download/v3.00/zlib-1.2.8.tar.xz | tar -xJ
  - cd ../deps && travis_retry git clone https://github.com/upx/upx-testsuite
  - |
    if [[ $X =~ (^|\+)rebuild-stubs($|\+) ]]; then
      cd ../deps && travis_retry wget -q -O - https://github.com/upx/upx-stubtools/releases/download/v20160918/bin-upx-20160918.tar.xz | tar -xJ
    fi

script:
  - success=1
  - cd $TRAVIS_BUILD_DIR || success=0
  - test $success = 0 || bash ./.github/travis_build.sh || success=0
  - test $success = 0 || bash ./.github/travis_testsuite_1.sh || success=0
  - test $success = 0 || bash ./.github/travis_deploy.sh || success=0
  - test $success = 1

# vim:set ts=2 sw=2 et:
