ghcup/.travis.sh

53 lines
1023 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-10-08 14:58:13 +00:00
edo mkdir -p "$HOME"/.local/bin
edo cp ./ghcup "$HOME"/.local/bin/ghcup
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-08 14:58:13 +00:00
edo ghcup -v install-cabal
2018-10-02 18:04:45 +00:00
2018-09-29 16:02:14 +00:00
# install shellcheck
2018-10-08 14:58:13 +00:00
edo wget https://storage.googleapis.com/shellcheck/shellcheck-latest.linux.x86_64.tar.xz
edo tar -xJf shellcheck-latest.linux.x86_64.tar.xz
edo mv shellcheck-latest/shellcheck "$HOME"/.local/bin/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-08 14:58:13 +00:00
edo ghcup self-update
2018-10-03 04:10:11 +00:00
edo ghcup show
2018-10-08 14:58:13 +00:00
2018-10-17 10:19:43 +00:00
edo ghcup debug-info
2018-10-08 14:58:13 +00:00
edo ghc --version