Skip to content

Commit bcfa908

Browse files
committed
Try caching
1 parent 773ec86 commit bcfa908

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
ghc-version: ${{ matrix.ghc }}
2929
cabal-version: '3.2'
3030

31-
# - name: Cache Cabal
32-
# uses: actions/[email protected]
33-
# with:
34-
# path: ~/.cabal
35-
# key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-0
31+
- name: Cache Cabal
32+
uses: actions/[email protected]
33+
with:
34+
path: ~/.cabal
35+
key: ${{ runner.OS }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
3636

3737
- name: Shorten binary names
3838
shell: bash
@@ -51,13 +51,16 @@ jobs:
5151
echo '::set-env name=WIN_CABAL_ARGS::-j1'
5252
5353
- name: Set some linux specific things
54-
if: matrix.os == 'ubuntu-latest'
54+
if: matrix.os == 'ubuntu-latest'
5555
run: |
5656
echo '::set-env name=LINUX_CABAL_ARGS::--enable-executable-static'
5757
5858
- name: Build Server
5959
shell: bash
60-
run: cabal build exe:hls -O2 --disable-documentation $WIN_CABAL_ARGS $LINUX_CABAL_ARGS
60+
# Try building it twice in case of flakey builds on Windows
61+
run: |
62+
cabal build exe:hls -O2 --disable-documentation $WIN_CABAL_ARGS $LINUX_CABAL_ARGS || \
63+
cabal build exe:hls -O2 --disable-documentation $WIN_CABAL_ARGS $LINUX_CABAL_ARGS
6164
6265
- name: Find Server Binary
6366
id: find_server_binary

0 commit comments

Comments
 (0)