Skip to content

Commit 16e5c55

Browse files
committed
Choose shorter build directory
1 parent 9b12dd5 commit 16e5c55

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
needs:
6161
- pre_job
6262
runs-on: ${{ matrix.os }}
63+
env:
64+
CABAL_ARGS: "--builddir b"
6365
strategy:
6466
# We don't want to fail fast.
6567
# We used to fail fast, to avoid caches of failing PRs to overpopulate the CI
@@ -105,71 +107,71 @@ jobs:
105107
os: ${{ runner.os }}
106108

107109
- name: Build
108-
run: cabal build all
110+
run: cabal build ${CABAL_ARGS} all
109111

110112
- name: Set test options
111113
# See https://github.com/ocharles/tasty-rerun/issues/22 for why we need
112114
# to include 'new' in the filters, since many of our test suites are in the
113115
# same package.
114116
run: |
115-
cabal configure --test-options="--rerun-update --rerun-filter failures,exceptions,new"
117+
cabal configure ${CABAL_ARGS} --test-options="--rerun-update --rerun-filter failures,exceptions,new"
116118
117119
- if: matrix.test
118120
name: Test hls-graph
119-
run: cabal test hls-graph
121+
run: cabal test ${CABAL_ARGS} hls-graph
120122

121123
- if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
122124
name: Test ghcide
123125
# run the tests without parallelism to avoid running out of memory
124-
run: cabal test ghcide-tests || cabal test ghcide-tests
126+
run: cabal test ${CABAL_ARGS} ghcide-tests || cabal test ${CABAL_ARGS} ghcide-tests
125127

126128
- if: matrix.test
127129
name: Test hls-plugin-api
128-
run: cabal test hls-plugin-api || cabal test hls-plugin-api
130+
run: cabal test ${CABAL_ARGS} hls-plugin-api || cabal test ${CABAL_ARGS} hls-plugin-api
129131

130132
- if: matrix.test
131133
name: Test func-test suite
132134
env:
133135
HLS_TEST_EXE: hls
134136
HLS_WRAPPER_TEST_EXE: hls-wrapper
135-
run: cabal test func-test || cabal test func-test
137+
run: cabal test ${CABAL_ARGS} func-test || cabal test ${CABAL_ARGS} func-test
136138

137139
- if: matrix.test
138140
name: Test wrapper-test suite
139141
env:
140142
HLS_TEST_EXE: hls
141143
HLS_WRAPPER_TEST_EXE: hls-wrapper
142-
run: cabal test wrapper-test
144+
run: cabal test ${CABAL_ARGS} wrapper-test
143145

144146
- if: matrix.test
145147
name: Test hls-refactor-plugin
146-
run: cabal test hls-refactor-plugin-tests || cabal test hls-refactor-plugin-tests
148+
run: cabal test ${CABAL_ARGS} hls-refactor-plugin-tests || cabal test ${CABAL_ARGS} hls-refactor-plugin-tests
147149

148150
# TODO enable when it supports 9.10
149151
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
150152
name: Test hls-floskell-plugin
151-
run: cabal test hls-floskell-plugin-tests || cabal test hls-floskell-plugin-tests
153+
run: cabal test ${CABAL_ARGS} hls-floskell-plugin-tests || cabal test ${CABAL_ARGS} hls-floskell-plugin-tests
152154

153155
- if: matrix.test
154156
name: Test hls-class-plugin
155-
run: cabal test hls-class-plugin-tests || cabal test hls-class-plugin-tests
157+
run: cabal test ${CABAL_ARGS} hls-class-plugin-tests || cabal test ${CABAL_ARGS} hls-class-plugin-tests
156158

157159
- if: matrix.test
158160
name: Test hls-pragmas-plugin
159-
run: cabal test hls-pragmas-plugin-tests || cabal test hls-pragmas-plugin-tests
161+
run: cabal test ${CABAL_ARGS} hls-pragmas-plugin-tests || cabal test ${CABAL_ARGS} hls-pragmas-plugin-tests
160162

161163
- if: matrix.test
162164
name: Test hls-eval-plugin
163-
run: cabal test hls-eval-plugin-tests || cabal test hls-eval-plugin-tests
165+
run: cabal test ${CABAL_ARGS} hls-eval-plugin-tests || cabal test ${CABAL_ARGS} hls-eval-plugin-tests
164166

165167
# TODO enable when it supports 9.10
166168
- if: matrix.test && matrix.ghc != '9.10' && matrix.ghc != '9.12' && matrix.ghc != '9.14' && matrix.ghc != '9.10.2'
167169
name: Test hls-splice-plugin
168-
run: cabal test hls-splice-plugin-tests || cabal test hls-splice-plugin-tests
170+
run: cabal test ${CABAL_ARGS} hls-splice-plugin-tests || cabal test ${CABAL_ARGS} hls-splice-plugin-tests
169171

170172
- if: matrix.test && matrix.ghc != '9.12' && matrix.ghc != '9.14'
171173
name: Test hls-stan-plugin
172-
run: cabal test hls-stan-plugin-tests || cabal test hls-stan-plugin-tests
174+
run: cabal test ${CABAL_ARGS} hls-stan-plugin-tests || cabal test ${CABAL_ARGS} hls-stan-plugin-tests
173175

174176
- if: matrix.test && matrix.ghc != '9.14'
175177
name: Test hls-stylish-haskell-plugin

0 commit comments

Comments
 (0)