Commit | Line | Data |
---|---|---|
7755014c JM |
1 | #!/bin/bash |
2 | ||
3 | set -ex | |
4 | ||
0ff53c8d JM |
5 | BUILD_IMPL=${BUILD_IMPL:-${IMPL}} |
6 | ||
6e8730c4 | 7 | mode_var=${IMPL}_MODE |
2d76e877 JM |
8 | mode_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. | |
12 | if [ -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 | 29 | else |
2d76e877 | 30 | make ${mode_val:+${mode_var}=${mode_val}} \ |
7a6fdd1b | 31 | -C ${BUILD_IMPL} |
c727d1c8 | 32 | fi |