Skip to content

Commit 36bbfce

Browse files
committed
CI: {cache-deps,test}: run build multiple times only for Windows
1 parent 22965ba commit 36bbfce

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/cache-deps.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ jobs:
9595
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
9696
src/**/*.hs exe/*.hs
9797
98-
# repeating builds to workaround segfaults in windows and ghc-8.8.4
9998
- name: Build
100-
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies
99+
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies
100+
101+
# repeating builds to workaround segfaults in windows and ghc-8.8.4
102+
- if: ${{ env.RUNNER_OS }} == 'Windows'
103+
name: In Windows run build additional 2 times
104+
run: cabal v2-build --enable-tests --enable-benchmarks --only-dependencies || cabal v2-build --enable-tests --enable-benchmarks --only-dependencies

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,13 @@ jobs:
136136
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
137137
src/**/*.hs exe/*.hs
138138
139-
# repeating builds to workaround segfaults in windows and ghc-8.8.4
140139
- name: Build
141-
run: cabal build || cabal build || cabal build
140+
run: cabal v2-build
141+
142+
# repeating builds to workaround segfaults in windows and ghc-8.8.4
143+
- if: ${{ env.RUNNER_OS }} == 'Windows'
144+
name: In Windows run build additional 2 times
145+
run: cabal v2-build || cabal v2-build
142146

143147
- name: Set test options
144148
run: |

0 commit comments

Comments
 (0)