1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-26 21:09:44 +01:00

Add stack resolver version switch (#38). (#45)

The script can now be run with, e.g.
`env STACK_RESOLVER=lts-7.3 ci_build/outer_launch_tests.sh`
and will use the specified version of the resolver.

We can't quite enable this for lts-7.3 as the code is not pedantically
clean. We will reconsider when 8.0.2 is available which removes
`-Wredundant-constraints` from `-Wall`.
This commit is contained in:
Greg Steuck 2016-11-23 09:47:01 -08:00 committed by Judah Jacobson
parent 5fa1d2ba8f
commit 455e5a83c9
2 changed files with 8 additions and 5 deletions

View file

@ -11,6 +11,8 @@ MAINTAINER TensorFlow authors <tensorflow-haskell@googlegroups.com>
ADD . /tfhs ADD . /tfhs
WORKDIR /tfhs WORKDIR /tfhs
ARG STACK_RESOLVER
RUN \ RUN \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442 && \ 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 && \ 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' && \ bazel build -c opt '//tensorflow:libtensorflow_c.so' && \
install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \ install bazel-bin/tensorflow/libtensorflow_c.so /usr/local/lib && \
ldconfig ) && \ ldconfig ) && \
stack setup && \ stack setup --resolver=${STACK_RESOLVER} && \
stack test --only-dependencies stack test --resolver=${STACK_RESOLVER} --only-dependencies

View file

@ -4,8 +4,9 @@
set -eu -o pipefail 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 git submodule update
docker build -t $IMAGE_NAME -f ci_build/Dockerfile . docker build --build-arg STACK_RESOLVER=$STACK_RESOLVER -t $IMAGE_NAME -f ci_build/Dockerfile .
docker run $IMAGE_NAME stack build --pedantic --test docker run $IMAGE_NAME stack build --resolver=$STACK_RESOLVER --pedantic --test