summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: a79256db0851ee46bbab9d5ec2f6144f685fb442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
language: bash
sudo: false

env:
  global:
    - ELIXIR_ASSERT_TIMEOUT=2000
  matrix:
    - OTP_RELEASE=OTP-22.0 CHECK_REPRODUCIBLE=true CHECK_POSIX_COMPLIANT=true
    - OTP_RELEASE=OTP-21.3.8
    - OTP_RELEASE=OTP-21.2
    - OTP_RELEASE=OTP-21.1
    - OTP_RELEASE=OTP-21.0
    - OTP_RELEASE=maint
    - OTP_RELEASE=master

matrix:
  fast_finish: true
  allow_failures:
    - env: OTP_RELEASE=maint
    - env: OTP_RELEASE=master

install:
  - wget -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-14.04/${OTP_RELEASE}.tar.gz
  - mkdir -p otp
  - tar zxf otp.tar.gz -C otp --strip-components=1
  - otp/Install -minimal $(pwd)/otp
  - PATH=$(pwd)/otp/bin:$PATH

script:
  - rm -rf .git
  - ELIXIRC_OPTS="--warnings-as-errors" ERLC_OPTS="+warning_as_errors" make compile
  - make test
  - dialyzer -pa lib/elixir/ebin --build_plt --output_plt elixir.plt --apps lib/elixir/ebin/elixir.beam lib/elixir/ebin/Elixir.Kernel.beam

  # Check for reproducible builds only in the latest OTP release
  - if [ -n "$CHECK_REPRODUCIBLE" ]; then make check_reproducible; fi

  # Check for POSIX compliant shell scripts
  - if [ -n "$CHECK_POSIX_COMPLIANT" ]; then
      shellcheck -e SC2039,2086 bin/elixir && echo "bin/elixir is POSIX compliant";
      shellcheck bin/elixirc && echo "bin/elixirc is POSIX compliant";
      shellcheck bin/iex && echo "bin/iex is POSIX compliant";
    fi