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
2121 # from the oldest version in the list
2222 : " ${GHCS:= " $( cd " $CI_PROJECT_DIR /out/${ARTIFACT} " && rm -f ./* .json && for ghc in * ; do printf " %s\n" " $ghc " ; done | sort -r | tr ' \n' ' ' ) " } "
2323 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"
2626 ;;
2727 * )
2828 fail " Unknown TARBALL_EXT: ${TARBALL_EXT} "
Original file line number Diff line number Diff line change @@ -11,15 +11,17 @@ uname
1111pwd
1212env
1313
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.
1517install_ghcup
1618
1719# ensure cabal-cache
1820download_cabal_cache " $HOME /.local/bin/cabal-cache"
1921
2022
2123# build
22- ghcup install ghc " ${GHC_VERSION} " || cat /github/workspace/.ghcup/logs/ *
24+ ghcup install ghc " ${GHC_VERSION} " || fail_with_ghcup_logs " install ghc "
2325ghcup set ghc " ${GHC_VERSION} "
2426sed -i.bak -e ' /DELETE MARKER FOR CI/,/END DELETE/d' cabal.project # see comment in cabal.project
2527ecabal update
Original file line number Diff line number Diff line change @@ -182,6 +182,10 @@ error() { echo_color "${RED}" "$1"; }
182182warn () { echo_color " ${LT_BROWN} " " $1 " ; }
183183info () { echo_color " ${LT_BLUE} " " $1 " ; }
184184
185+ fail_with_ghcup_logs () {
186+ cat /github/workspace/.ghcup/logs/*
187+ fail " $! "
188+ }
185189fail () { error " error: $1 " ; exit 1; }
186190
187191run () {
You can’t perform that action at this time.
0 commit comments