diff --git a/ci_build/Dockerfile b/ci_build/Dockerfile index b06f9e6..515b25f 100644 --- a/ci_build/Dockerfile +++ b/ci_build/Dockerfile @@ -11,6 +11,8 @@ MAINTAINER TensorFlow authors ADD . /tfhs WORKDIR /tfhs +ARG STACK_RESOLVER + RUN \ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442 && \ echo 'deb http://download.fpcomplete.com/ubuntu trusty main'| tee /etc/apt/sources.list.d/fpco.list && \ @@ -30,5 +32,5 @@ RUN \ bazel build -c opt '//tensorflow:libtensorflow_c.so' && \ install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \ ldconfig ) && \ - stack setup && \ - stack test --only-dependencies + stack setup --resolver=${STACK_RESOLVER} && \ + stack test --resolver=${STACK_RESOLVER} --only-dependencies diff --git a/ci_build/outer_launch_tests.sh b/ci_build/outer_launch_tests.sh index 12a9067..ace0a31 100755 --- a/ci_build/outer_launch_tests.sh +++ b/ci_build/outer_launch_tests.sh @@ -4,8 +4,9 @@ set -eu -o pipefail -IMAGE_NAME=tensorflow/haskell/ci_build:v0 +STACK_RESOLVER=${STACK_RESOLVER:-lts-6.2} +IMAGE_NAME=tensorflow/haskell/ci_build:$STACK_RESOLVER git submodule update -docker build -t $IMAGE_NAME -f ci_build/Dockerfile . -docker run $IMAGE_NAME stack build --pedantic --test +docker build --build-arg STACK_RESOLVER=$STACK_RESOLVER -t $IMAGE_NAME -f ci_build/Dockerfile . +docker run $IMAGE_NAME stack build --resolver=$STACK_RESOLVER --pedantic --test