27
27
# Ideally the three ghcs should be the used for the release
28
28
GHC_FOR_SOLVER_BENCHMARKS : ' 8.10.7'
29
29
GHC_FOR_COMPLETE_HACKAGE_TESTS : ' 8.10.7'
30
+ COMMON_FLAGS : ' -j 2 -v'
30
31
31
32
jobs :
32
33
validate :
91
92
92
93
- name : Set validate inputs
93
94
run : |
94
- FLAGS=""
95
+ FLAGS="${{ env.COMMON_FLAGS }} "
95
96
if [[ "${{ matrix.cli }}" == "false" ]]; then
96
97
FLAGS="$FLAGS --lib-only"
97
98
fi
@@ -104,13 +105,13 @@ jobs:
104
105
echo "FLAGS=$FLAGS" >> $GITHUB_ENV
105
106
106
107
- name : Validate print-config
107
- run : sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v $FLAGS -s print-config
108
+ run : sh validate.sh $FLAGS -s print-config
108
109
109
110
- name : Validate print-tool-versions
110
- run : sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v $FLAGS -s print-tool-versions
111
+ run : sh validate.sh $FLAGS -s print-tool-versions
111
112
112
113
- name : Validate build
113
- run : sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v $FLAGS -s build
114
+ run : sh validate.sh $FLAGS -s build
114
115
115
116
- name : Tar cabal head executable
116
117
if : matrix.cli != 'false' && matrix.ghc == env.GHC_FOR_RELEASE
@@ -139,21 +140,18 @@ jobs:
139
140
# `rawSystemStdInOut reports text decoding errors`
140
141
# test does not find ghc without the full path in windows
141
142
GHCPATH : ${{ steps.setup-haskell.outputs.ghc-exe }}
142
- run : sh validate.sh -j 2 -w $GHCPATH -v $FLAGS -s lib-tests
143
+ run : sh validate.sh $FLAGS -s lib-tests
143
144
144
145
- name : Validate lib-suite
145
- run : sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v $FLAGS -s lib-suite
146
+ run : sh validate.sh $FLAGS -s lib-suite
146
147
147
148
- name : Validate cli-tests
148
149
if : matrix.cli != 'false'
149
- run : sh validate.sh -j 2 -w ghc-${{ matrix.ghc }} -v $FLAGS -s cli-tests
150
+ run : sh validate.sh $FLAGS -s cli-tests
150
151
151
152
- name : Validate cli-suite
152
153
if : matrix.cli != 'false'
153
- # We have to use `-w ghc` intead `-w ghc-${{ matrix.ghc }}` here to
154
- # workaround the max path limit in windows for ghc <= 8.6.5
155
- # See https://github.com/haskell/cabal/issues/6271#issuecomment-1065102255
156
- run : sh validate.sh -j 2 -w ghc -v $FLAGS -s cli-suite
154
+ run : sh validate.sh $FLAGS -s cli-suite
157
155
158
156
validate-old-ghcs :
159
157
name : Validate old ghcs ${{ matrix.extra-ghc }}
@@ -216,13 +214,12 @@ jobs:
216
214
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
217
215
218
216
- name : Validate build
219
- run : sh validate.sh -j 2 -w ghc- ${{ matrix.ghc }} -v ${{ matrix.flags }} -s build
217
+ run : sh validate.sh ${{ env.COMMON_FLAGS }} -s build
220
218
221
219
- name : " Validate lib-suite-extras --extra-hc ghc-${{ matrix.extra-ghc }}"
222
220
env :
223
- FLAGS : " --lib-only -s lib-suite-extras"
224
221
EXTRA_GHC : " /opt/ghc/${{ matrix.extra-ghc }}/bin/ghc-${{ matrix.extra-ghc }}"
225
- run : sh validate.sh -j 2 -w ghc- ${{ matrix.ghc }} -v ${{ env.FLAGS }} --extra-hc ${{ env.EXTRA_GHC }}
222
+ run : sh validate.sh ${{ env.COMMON_FLAGS }} --lib-only -s lib-suite-extras --extra-hc ${{ env.EXTRA_GHC }}
226
223
227
224
# The previous jobs use a released version of cabal to build cabal HEAD itself
228
225
# This one uses the cabal HEAD generated executable in the previous step
@@ -258,12 +255,12 @@ jobs:
258
255
run : tar -xf ./cabal-head/cabal-head.tar -C ./cabal-head
259
256
260
257
- name : print-config using cabal HEAD
261
- run : sh validate.sh -j 2 -w ghc- ${{ matrix.ghc }} --with-cabal ./cabal-head/cabal -v -s print-config
258
+ run : sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s print-config
262
259
263
260
# We dont use cache to force a build with a fresh store dir and build dir
264
261
# This way we check cabal can build all its dependencies
265
262
- name : Build using cabal HEAD
266
- run : sh validate.sh -j 2 -w ghc- ${{ matrix.ghc }} --with-cabal ./cabal-head/cabal -v -s build
263
+ run : sh validate.sh ${{ env.COMMON_FLAGS }} --with-cabal ./cabal-head/cabal -s build
267
264
268
265
# We use this job as a resume of the workflow
269
266
# It will fail if any of the previous jobs does it
0 commit comments