Skip to content

Commit

Permalink
Switched to lts-8.13, added custom-setup. (tensorflow#106)
Browse files Browse the repository at this point in the history
* Switched to lts-8.13, added custom-setup.

Our packages no longer elicit complaints like this:
Package tensorflow-foo uses a custom Cabal build, but does not use a
custom-setup stanza.

* Removed some extra-deps and explicit-setup-deps

* Removed provisions for different versions of stack lts.

We are now solidly in the 8-only territory.
  • Loading branch information
blackgnezdo authored and judah committed May 10, 2017
1 parent ff5f1cc commit 1d45e33
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 34 deletions.
6 changes: 2 additions & 4 deletions ci_build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ MAINTAINER TensorFlow authors <[email protected]>
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 && \
Expand All @@ -33,5 +31,5 @@ RUN \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.0.0.tar.gz && \
tar zxf libtensorflow-cpu-linux-x86_64-1.0.0.tar.gz -C /usr/local && \
ldconfig && \
stack setup --resolver=${STACK_RESOLVER} && \
stack test --resolver=${STACK_RESOLVER} --only-dependencies
stack setup && \
stack test --only-dependencies
7 changes: 3 additions & 4 deletions ci_build/outer_launch_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

set -eu -o pipefail

STACK_RESOLVER=${STACK_RESOLVER:-lts-6.2}
IMAGE_NAME=tensorflow/haskell/ci_build:$STACK_RESOLVER
IMAGE_NAME=tensorflow/haskell/ci_build:lts8

git submodule update
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
docker build -t $IMAGE_NAME -f ci_build/Dockerfile .
docker run $IMAGE_NAME stack build --pedantic --test
13 changes: 1 addition & 12 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-8.6
resolver: lts-8.13

packages:
- google-shim
Expand All @@ -17,19 +17,8 @@ packages:
- tensorflow-test

extra-deps:
# proto-lens is not yet in Stackage.
- proto-lens-0.2.0.1
- proto-lens-protoc-0.2.0.1
- proto-lens-descriptors-0.2.0.1
- snappy-framing-0.1.1
- snappy-0.2.0.2
- lens-labels-0.1.0.1

# Allow our custom Setup.hs scripts to import Data.ProtoLens.Setup from the version of
# `proto-lens-protoc` in stack's local DB. See:
# https://github.com/google/proto-lens/blob/master/README.md#using-cabal
explicit-setup-deps:
"*": true

# For Mac OS X, whose linker doesn't use this path by default:
extra-lib-dirs:
Expand Down
15 changes: 11 additions & 4 deletions tensorflow-core-ops/tensorflow-core-ops.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ maintainer: [email protected]
copyright: Google Inc.
category: Machine Learning
build-type: Custom
cabal-version: >=1.22
cabal-version: >=1.24

library
exposed-modules: TensorFlow.GenOps.Core
build-depends: Cabal >= 1.22 && < 1.25
build-depends: bytestring
, proto-lens == 0.2.*
, tensorflow == 0.1.*
, base >= 4.7 && < 5
, lens-family
, text
default-language: Haskell2010

custom-setup
setup-depends: Cabal
, bytestring
, directory
, proto-lens == 0.2.*
Expand All @@ -22,9 +31,7 @@ library
, base >= 4.7 && < 5
, filepath
, mainland-pretty
, lens-family
, text
default-language: Haskell2010

source-repository head
type: git
Expand Down
21 changes: 12 additions & 9 deletions tensorflow-mnist-input-data/tensorflow-mnist-input-data.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainer: [email protected]
copyright: Google Inc.
category: Machine Learning
build-type: Custom
cabal-version: >=1.22
cabal-version: >=1.24
-- These files are downloaded automatically by Setup.hs. If the
-- automatic download fails, follow the instructions in error messages
-- displayed by Setup.hs.
Expand All @@ -20,16 +20,19 @@ library
hs-source-dirs: src
exposed-modules: TensorFlow.Examples.MNIST.InputData
other-modules: Paths_tensorflow_mnist_input_data
build-depends: Cabal
, HTTP
, base >= 4.7 && < 5
, bytestring
, cryptonite
, directory
, filepath
, network-uri
build-depends: base >= 4.7 && < 5
default-language: Haskell2010

custom-setup
setup-depends: Cabal
, HTTP
, base >= 4.7 && < 5
, bytestring
, cryptonite
, directory
, filepath
, network-uri

source-repository head
type: git
location: https://github.com/tensorflow/haskell
6 changes: 5 additions & 1 deletion tensorflow-proto/tensorflow-proto.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainer: [email protected]
copyright: Google Inc.
category: Machine Learning
build-type: Custom
cabal-version: >=1.22
cabal-version: >=1.24
extra-source-files: ../third_party/tensorflow/tensorflow/core/framework/*.proto
, ../third_party/tensorflow/tensorflow/core/protobuf/config.proto
, ../third_party/tensorflow/tensorflow/core/protobuf/debug.proto
Expand Down Expand Up @@ -40,6 +40,10 @@ library
default-language: Haskell2010
include-dirs: .

custom-setup
setup-depends: Cabal
, proto-lens-protoc == 0.2.*
, base >= 4.7 && < 5
source-repository head
type: git
location: https://github.com/tensorflow/haskell

0 comments on commit 1d45e33

Please sign in to comment.