forked from kanaka/mal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis_build.sh
executable file
·32 lines (27 loc) · 1.02 KB
/
.travis_build.sh
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
#!/bin/bash
set -ex
BUILD_IMPL=${BUILD_IMPL:-${IMPL}}
mode_var=${IMPL}_MODE
mode_val=${!mode_var}
# If NO_DOCKER is blank then launch use a docker image, otherwise
# use the Travis image/tools directly.
if [ -z "${NO_DOCKER}" ]; then
impl=$(echo "${IMPL}" | tr '[:upper:]' '[:lower:]')
img_impl=$(echo "${BUILD_IMPL}" | tr '[:upper:]' '[:lower:]')
docker pull kanaka/mal-test-${impl}
if [ "${impl}" != "${img_impl}" ]; then
docker pull kanaka/mal-test-${img_impl}
fi
if [ "${BUILD_IMPL}" = "rpython" ]; then
# rpython often fails on step9 in compute_vars_longevity
# so build step9, then continue wit the full build
docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} \
make -C ${BUILD_IMPL} step9_try || true
fi
docker run -it -u $(id -u) -v `pwd`:/mal kanaka/mal-test-${img_impl} \
make ${mode_val:+${mode_var}=${mode_val}} \
-C ${BUILD_IMPL}
else
make ${mode_val:+${mode_var}=${mode_val}} \
-C ${BUILD_IMPL}
fi