ghcup/.travis.sh

72 lines
1.4 KiB
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
2018-11-06 08:27:27 +00:00
edo rm .available-versions
edo rm .download-urls
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 -c 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-27 07:19:55 +00:00
# rm GHC
2018-10-27 08:18:14 +00:00
edo ./ghcup -v rm -f 8.6.1
edo ./ghcup -v rm -f 8.4.3
2018-09-29 19:18:31 +00:00
# reinstall from cached tarball
edo ./ghcup -v -c install 8.6.1
edo ./ghcup -v rm -f 8.6.1
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
edo ./ghcup -v rm -f 8.2.2
2018-09-29 16:02:14 +00:00
# install default GHC
edo ./ghcup -v install
2019-01-07 03:39:49 +00:00
edo ./ghcup -v set
# install latest GHC
edo ./ghcup -v install latest
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-10-27 07:19:55 +00:00
edo cabal --version
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
edo ghcup -v debug-info
2018-10-08 14:58:13 +00:00
edo ghcup -v list
edo ghcup -v list -t ghc
edo ghcup -v list -t cabal-install
2018-10-17 10:19:43 +00:00
2018-10-08 14:58:13 +00:00
edo ghc --version
# self update destructively
edo ghcup -v upgrade