ghcup/.travis.sh

47 lines
874 B
Bash
Raw Normal View History

2018-09-29 16:02:14 +00:00
#!/bin/sh
set -e
# install GHCs
2018-09-29 17:17:14 +00:00
./ghcup -v install 8.2.2
./ghcup -v install 8.4.3
./ghcup -v install 8.6.1
2018-09-29 16:02:14 +00:00
# set GHC
2018-09-29 17:17:14 +00:00
./ghcup -v set 8.6.1
./ghcup -v set 8.4.3
2018-09-29 19:18:31 +00:00
# rm GHC
./ghcup -v rm 8.6.1
./ghcup -v rm 8.4.3
# set GHC
2018-09-29 17:17:14 +00:00
./ghcup -v set 8.2.2
2018-09-29 16:02:14 +00:00
2018-09-30 11:48:27 +00:00
export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
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-09-30 08:46:50 +00:00
./ghcup -v install-cabal
2018-09-29 16:02:14 +00:00
2018-10-03 03:31:18 +00:00
# https://github.com/haskell/cabal/issues/5516
mkdir -p ~/.cabal/store/ghc-8.2.2/package.db
2018-10-03 03:52:27 +00:00
cabal new-update
2018-10-03 03:31:18 +00:00
# this shouldn't be necessary, file bug upstream
cabal new-install --symlink-bindir="$HOME"/.ghcup/bin cabal-install
mv -f "$HOME"/.ghcup/bin/cabal "$HOME"/.cabal/bin/cabal
2018-10-02 18:04:45 +00:00
2018-09-29 16:02:14 +00:00
# install shellcheck
2018-10-02 18:04:45 +00:00
cabal new-install ShellCheck
2018-09-29 16:02:14 +00:00
# check our script for errors
2018-09-30 08:46:50 +00:00
shellcheck ghcup
2018-10-02 17:32:24 +00:00
# self update
ghcup self-update