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