ghcup/.travis.sh

52 lines
940 B
Bash
Raw Normal View History

2018-09-29 16:02:14 +00:00
#!/bin/sh
2018-10-03 04:10:11 +00:00
edo()
{
printf "\\033[0;34m%s\\033[0m\\n" "$*" 1>&2
"$@" || exit 2
}
2018-09-29 16:02:14 +00:00
# install GHCs
2018-10-03 04:10:11 +00:00
edo ./ghcup -v install 8.2.2
edo ./ghcup -v install 8.4.3
edo ./ghcup -v install 8.6.1
2018-09-29 16:02:14 +00:00
# set GHC
2018-10-03 04:10:11 +00:00
edo ./ghcup -v set 8.6.1
edo ./ghcup -v set 8.4.3
2018-09-29 19:18:31 +00:00
2018-10-03 04:10:11 +00:00
# rm G HC
edo ./ghcup -v rm 8.6.1
edo ./ghcup -v rm 8.4.3
2018-09-29 19:18:31 +00:00
# set GHC
2018-10-03 04:10:11 +00:00
edo ./ghcup -v set 8.2.2
2018-09-29 16:02:14 +00:00
2018-10-03 04:10:11 +00:00
export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$PATH"
2018-09-30 11:48:27 +00:00
2018-09-30 18:16:02 +00:00
# TODO: exceeds maximum time limit of travis
2018-09-30 11:39:40 +00:00
# compile GHC from source
2018-09-30 18:16:02 +00:00
#./ghcup -v compile 8.4.3 ghc-8.2.2
2018-09-30 11:39:40 +00:00
2018-09-29 16:02:14 +00:00
# install cabal-install
2018-10-03 04:10:11 +00:00
edo ./ghcup -v install-cabal
2018-09-29 16:02:14 +00:00
2018-10-03 04:10:11 +00:00
edo cabal update
edo cabal install cabal-install
2018-10-03 03:31:18 +00:00
# https://github.com/haskell/cabal/issues/5516
2018-10-03 04:10:11 +00:00
edo mkdir -p ~/.cabal/store/ghc-8.2.2/package.db
edo cabal new-update
2018-10-02 18:04:45 +00:00
2018-09-29 16:02:14 +00:00
# install shellcheck
2018-10-03 04:10:11 +00:00
edo cabal new-install ShellCheck
2018-09-29 16:02:14 +00:00
# check our script for errors
2018-10-03 04:10:11 +00:00
edo shellcheck ghcup
2018-10-02 17:32:24 +00:00
# self update
2018-10-03 04:10:11 +00:00
edo mkdir -p "$HOME"/.local/bin
edo ./ghcup self-update
edo ghcup show