@@ -32,20 +32,24 @@ jobs:
32
32
ghc-version : ${{ matrix.ghc }}
33
33
cabal-version : ${{ matrix.cabal }}
34
34
35
- - name : Configure
36
- run : |
37
- cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
38
- cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17'
39
-
40
35
- name : Freeze
41
36
run : |
37
+ cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
42
38
cabal freeze
43
39
44
40
45
- name : Cache ~/.cabal/store
41
+ name : Cache ~/.cabal/store and dist-newstyle
46
42
with :
47
- path : ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
43
+ path : |
44
+ ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
45
+ dist-newstyle
48
46
key : ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
47
+ restore-keys : |
48
+ ${{ runner.os }}-${{ matrix.ghc }}-
49
+
50
+ - name : Configure
51
+ run : |
52
+ cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17'
49
53
50
54
- name : Build
51
55
run : |
@@ -115,16 +119,17 @@ jobs:
115
119
stack test --system-ghc
116
120
117
121
ghcjs :
118
- name : cabal / ghcjs 8.4
122
+ name : ubuntu-18.04 / ghcjs 8.4
119
123
runs-on : " ubuntu-18.04"
120
124
121
125
steps :
122
126
- uses : actions/checkout@v2
127
+
123
128
- name : " Setup PATH"
124
129
run : |
125
- echo "PATH=$HOME/.cabal/bin:$PATH" >> $GITHUB_ENV
130
+ echo "PATH=$HOME/.cabal/bin:/opt/ghcjs/8.4/bin: $PATH" >> $GITHUB_ENV
126
131
127
- - name : Install tools
132
+ - name : Install ghcjs and cabal
128
133
run : |
129
134
sudo add-apt-repository ppa:hvr/ghcjs
130
135
sudo apt-get update -y
@@ -135,7 +140,23 @@ jobs:
135
140
cp cabal.ghcjs.project cabal.project
136
141
cat cabal.project
137
142
143
+ - name : Cabal update and freeze
144
+ run : |
138
145
cabal v2-update
146
+ cabal v2-freeze
147
+
148
+
149
+ name : Cache ~/.cabal/store and dist-newstyle
150
+ with :
151
+ path : |
152
+ ~/.cabal/store
153
+ dist-newstyle
154
+ key : ubuntu-18.04-ghcjs8.4-${{ hashFiles('cabal.project.freeze') }}
155
+ restore-keys : |
156
+ ubuntu-18.04-ghcjs8.4-
157
+
158
+ - name : Install cabal-plan and hspec-discover
159
+ run : |
139
160
cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project cabal-plan --constraint='cabal-plan ^>=0.6.0.0' --constraint='cabal-plan +exe'
140
161
cabal v2-install -w /opt/ghc/8.4.4/bin/ghc --ignore-project hspec-discover
141
162
0 commit comments