Merge pull request #386 from asarhaddon/test-let-recursive-def
[jackhill/mal.git] / .travis_build.sh
CommitLineData
7755014c
JM
1#!/bin/bash
2
3set -ex
4
0ff53c8d
JM
5BUILD_IMPL=${BUILD_IMPL:-${IMPL}}
6
6e8730c4 7mode_var=${IMPL}_MODE
2d76e877
JM
8mode_val=${!mode_var}
9
c727d1c8
JM
10# If NO_DOCKER is blank then launch use a docker image, otherwise
11# use the Travis image/tools directly.
12if [ -z "${NO_DOCKER}" ]; then
7755014c 13 impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
fbcf24ee 14 img_impl=$(echo "${BUILD_IMPL}" | tr '[:upper:]' '[:lower:]')
7755014c
JM
15
16 docker pull kanaka/mal-test-${impl}
fbcf24ee
JM
17 if [ "${impl}" != "${img_impl}" ]; then
18 docker pull kanaka/mal-test-${img_impl}
7755014c 19 fi
0ff53c8d 20 if [ "${BUILD_IMPL}" = "rpython" ]; then
75fed11f
JM
21 # rpython often fails on step9 in compute_vars_longevity
22 # so build step9, then continue wit the full build
fbcf24ee 23 docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} \
75fed11f 24 make -C ${BUILD_IMPL} step9_try || true
0ff53c8d 25 fi
fbcf24ee 26 docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} \
2d76e877 27 make ${mode_val:+${mode_var}=${mode_val}} \
7a6fdd1b 28 -C ${BUILD_IMPL}
c727d1c8 29else
2d76e877 30 make ${mode_val:+${mode_var}=${mode_val}} \
7a6fdd1b 31 -C ${BUILD_IMPL}
c727d1c8 32fi