File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ name: Workflow
2
2
on : push
3
3
jobs :
4
4
docker :
5
- name : Docker
5
+ strategy :
6
+ matrix :
7
+ ghc :
8
+ - 9.0.2
9
+ name : Docker with GHC ${{ matrix.ghc }}
6
10
runs-on : ubuntu-latest
7
11
steps :
8
12
- uses : actions/checkout@v3
@@ -13,14 +17,19 @@ jobs:
13
17
with :
14
18
images : ghcr.io/${{ github.repository }}
15
19
flavor : latest=false
16
- tags : type=sha,format=long
20
+ tags : |
21
+ type=sha,format=long,prefix=${{ matrix.ghc }}-
22
+ type=raw,value=${{ matrix.ghc }},enable={{ is_default_branch }}
17
23
- uses : docker/login-action@v2
18
24
with :
19
25
password : ${{ secrets.GITHUB_TOKEN }}
20
26
registry : ghcr.io
21
27
username : ${{ github.actor }}
22
28
- uses : docker/build-push-action@v3
23
29
with :
30
+ build-args : GHC_VERSION=${{ matrix.ghc }}
31
+ cache-from : type=gha
32
+ cache-to : type=gha,mode=max
24
33
labels : ${{ steps.meta.outputs.labels }}
25
34
platforms : linux/amd64,linux/arm64
26
35
push : true
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ ARG GHC_VERSION=9.0.2
56
56
RUN \
57
57
set -o errexit -o xtrace; \
58
58
ghcup install ghc "$GHC_VERSION" --set; \
59
+ ghcup gc --profiling-libs --share-dir; \
59
60
ghc --version
60
61
61
62
# Install Cabal.
@@ -80,6 +81,7 @@ ARG HLS_VERSION=1.7.0.0
80
81
RUN \
81
82
set -o errexit -o xtrace; \
82
83
ghcup install hls "$HLS_VERSION" --set; \
84
+ ghcup gc --hls-no-ghc; \
83
85
haskell-language-server-wrapper --version
84
86
85
87
# Configure Cabal.
Original file line number Diff line number Diff line change
1
+ # docker-haskell
2
+
3
+ This Docker image provides a Haskell development environment with the following tools:
4
+
5
+ - [ GHCup] ( https://www.haskell.org/ghcup/ )
6
+ - [ GHC] ( https://www.haskell.org/ghc/ )
7
+ - [ Cabal] ( https://www.haskell.org/cabal/ )
8
+ - [ Stack] ( https://docs.haskellstack.org/en/stable/README/ )
9
+ - [ HLS] ( https://haskell-language-server.readthedocs.io/en/latest/ )
You can’t perform that action at this time.
0 commit comments