File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ case "${TARBALL_EXT}" in
21
21
# from the oldest version in the list
22
22
: " ${GHCS:= " $( cd " $CI_PROJECT_DIR /out/${ARTIFACT} " && rm -f ./* .json && for ghc in * ; do printf " %s\n" " $ghc " ; done | sort -r | tr ' \n' ' ' ) " } "
23
23
emake --version
24
- emake GHCUP=ghcup ARTIFACT=" ${ARTIFACT} " GHCS=" ${GHCS} " bindist || ( cat /github/workspace/.ghcup/logs/ * ; fail " make bindist failed" )
25
- emake GHCUP=ghcup ARTIFACT=" ${ARTIFACT} " bindist-tar || ( cat /github/workspace/.ghcup/logs/ * ; fail " make bindist failed" )
24
+ emake GHCUP=ghcup ARTIFACT=" ${ARTIFACT} " GHCS=" ${GHCS} " bindist || fail_with_ghcup_logs " make bindist failed"
25
+ emake GHCUP=ghcup ARTIFACT=" ${ARTIFACT} " bindist-tar || fail_with_ghcup_logs " make bindist failed"
26
26
;;
27
27
* )
28
28
fail " Unknown TARBALL_EXT: ${TARBALL_EXT} "
Original file line number Diff line number Diff line change @@ -11,15 +11,17 @@ uname
11
11
pwd
12
12
env
13
13
14
- # ensure ghcup
14
+ # Ensure ghcup is present and properly configured.
15
+ # Sets up the vanilla channel, as HLS CI provides binaries
16
+ # for GHCup's vanilla channel.
15
17
install_ghcup
16
18
17
19
# ensure cabal-cache
18
20
download_cabal_cache " $HOME /.local/bin/cabal-cache"
19
21
20
22
21
23
# build
22
- ghcup install ghc " ${GHC_VERSION} " || cat /github/workspace/.ghcup/logs/ *
24
+ ghcup install ghc " ${GHC_VERSION} " || fail_with_ghcup_logs " install ghc "
23
25
ghcup set ghc " ${GHC_VERSION} "
24
26
sed -i.bak -e ' /DELETE MARKER FOR CI/,/END DELETE/d' cabal.project # see comment in cabal.project
25
27
ecabal update
Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ error() { echo_color "${RED}" "$1"; }
182
182
warn () { echo_color " ${LT_BROWN} " " $1 " ; }
183
183
info () { echo_color " ${LT_BLUE} " " $1 " ; }
184
184
185
+ fail_with_ghcup_logs () {
186
+ cat /github/workspace/.ghcup/logs/*
187
+ fail " $! "
188
+ }
185
189
fail () { error " error: $1 " ; exit 1; }
186
190
187
191
run () {
You can’t perform that action at this time.
0 commit comments