Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 9aebd13

Browse files
author
Patrick Thomson
authored
Merge branch 'master' into fail-all-of-the-tests-at-once-and-explode-into-space
2 parents 87209d3 + 8953d7e commit 9aebd13

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Dockerfile

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
FROM haskell:8.6 as build
2+
WORKDIR /build
3+
RUN cabal new-update
4+
5+
# Build our upstream dependencies after copying in only enough to tell cabal
6+
# what they are. This will make these layers cache better even as we change the
7+
# code of semantic itself.
8+
COPY semantic.cabal .
9+
COPY cabal.project .
10+
COPY semantic-core/semantic-core.cabal ./semantic-core/
11+
COPY vendor ./vendor
12+
RUN cabal new-build --only-dependencies
13+
14+
# Once the dependencies are built, copy in the rest of the code and compile
15+
# semantic itself.
16+
COPY . /build
17+
RUN cabal new-build semantic:exe:semantic
18+
19+
# A fake `install` target until we can get `cabal new-install` to work
20+
RUN cp $(find dist-newstyle -name semantic -type f -perm -u=x) /usr/local/bin/semantic
21+
22+
# Create a fresh image containing only the compiled CLI program, so that the
23+
# image isn't bulked up by all of the extra build state.
24+
FROM debian:stretch-slim
25+
26+
RUN apt-get update && \
27+
apt-get install -y \
28+
libgmp10 \
29+
&& \
30+
apt-get autoremove -y && \
31+
apt-get clean -y && \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
COPY --from=build /usr/local/bin/semantic /usr/local/bin/semantic
35+
36+
ENTRYPOINT ["/usr/local/bin/semantic"]

semantic-core/semantic-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ library
3535
-- other-modules:
3636
-- other-extensions:
3737
build-depends: algebraic-graphs ^>= 0.3
38-
, base >= 4.11 && < 5
38+
, base >= 4.12 && < 5
3939
, containers ^>= 0.6
4040
, directory ^>= 1.3
4141
, filepath ^>= 1.4

semantic.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ common haskell
4141
-- as caret-operator bounds relative to a version in Stackage.
4242
-- These are currently pinned to lts-13.13.
4343
common dependencies
44-
build-depends: base >= 4.8 && < 5
44+
build-depends: base >= 4.12 && < 5
4545
, aeson ^>= 1.4.2.0
4646
, algebraic-graphs ^>= 0.3
4747
, async ^>= 2.2.1
@@ -271,7 +271,7 @@ library
271271
-- Custom Prelude
272272
, Prologue
273273

274-
build-depends: base >= 4.8 && < 5
274+
build-depends: base >= 4.12 && < 5
275275
, ansi-terminal ^>= 0.8.2
276276
, array ^>= 0.5.3.0
277277
, attoparsec ^>= 0.13.2.2

0 commit comments

Comments
 (0)