1sudo: required
2dist: trusty
3language: generic
4services:
5  - docker
6cache:
7  pip: true
8env:
9  global:
10    - USE_CONTAINER=docker
11matrix:
12  include:
13    - os: linux
14      env: ZSH_VERSION=zsh-5.4.2
15    - os: linux
16      env: ZSH_VERSION=zsh-5.4.1
17    - os: linux
18      env: ZSH_VERSION=zsh-5.4
19    - os: linux
20      env: ZSH_VERSION=zsh-5.3.1
21    - os: linux
22      env: ZSH_VERSION=zsh-5.3
23    - os: linux
24      env: ZSH_VERSION=zsh-5.2
25    - os: linux
26      env: ZSH_VERSION=zsh-5.1.1
27    - os: linux
28      env: ZSH_VERSION=zsh-5.0.0
29    - os: linux
30      env: ZSH_VERSION=zsh-4.3.17
31    - os: linux
32      env: ZSH_VERSION=zsh-4.3.11
33notifications:
34  webhooks:
35    urls:
36      - "https://webhooks.gitter.im/e/30fdb3abe241aa03af20"
37    on_success: always
38    on_failure: always
39    on_start: always
40script:
41  - if [ $TRAVIS_OS_NAME == 'osx' ]; then brew install zsh; pip install cram; fi
42  - make info tests stats USE_CONTAINER=$USE_CONTAINER
43
44  # Ensure the checked-in build matches the build produced in CI. Since the CI
45  # will run this on both OS X and Linux, the two platforms must also produce
46  # the same build, else one of them will fail.
47  - SHASUM=$(shasum -a 256 ./bin/antigen.zsh)
48  - VERSION=$(cat ./VERSION) make USE_CONTAINER=$USE_CONTAINER
49  - SHACHECK=$(shasum -a 256 ./bin/antigen.zsh)
50
51  - echo -e "$SHASUM\n$SHACHECK"
52  - test "$SHASUM" == "$SHACHECK"
53