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