cabal_install 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #!/bin/bash
  2. source .travis/header.sh
  3. set -e
  4. subtitle "*** Updating Cabal tools ***"
  5. travis_retry cabal update
  6. subtitle "*** Installing Alex, Happy, and shelltestrunner ***"
  7. travis_retry cabal fetch alex happy shelltestrunner
  8. cabal install -v0 alex happy
  9. cabal install -v0 --ghc-option=-w shelltestrunner
  10. ##############################################################################
  11. # Build environment information
  12. travis_fold start "ghc.info"
  13. title "GHC build information"
  14. subtitle "*** GHC version ***"
  15. ghc --version
  16. subtitle "*** Cabal version ***"
  17. cabal --version
  18. subtitle "*** Alex version ***"
  19. alex --version
  20. subtitle "*** Happy version ***"
  21. happy --version | sed 2q
  22. subtitle "*** Haddock version ***"
  23. haddock --version
  24. subtitle "*** Emacs version ***"
  25. emacs --version | sed 2q
  26. # The container environment reports a wrong number of cores. We use
  27. # a `sed` script (from https://github.com/hvr/multi-ghc-travis) for
  28. # commenting out `jobs: $ncpus` in the Cabal configuration file.
  29. sed -i 's/^jobs:/-- jobs:/' $HOME/.cabal/config
  30. subtitle "*** Cabal configuration ***"
  31. cat $HOME/.cabal/config
  32. travis_fold end "ghc.info"
  33. ##############################################################################
  34. # Installing the dependencies
  35. # N.B. `cabal install` doesn't set up the number of jobs by default
  36. # (cabal-install 1.22.4.0). See https://github.com/haskell/cabal/issues/2628.
  37. # We are using `make CABAL_OPTS...` because we are including the
  38. # options to `cabal install` set up in the `Makefile`.
  39. travis_fold start "build.dependencies"
  40. title "Building dependencies"
  41. # travis_retry cabal fetch `cabal install --dependencies-only --enable-tests --dry-run | sed 1,2d | sed "s|(latest[^)]*)||g"`
  42. travis_retry make CABAL_OPTS='-v0 --only-dependencies' install-bin
  43. travis_fold end "build.dependencies"
  44. ##############################################################################
  45. # Installing Agda
  46. travis_fold start "build.agda"
  47. title "Building Agda"
  48. # We need to install without -foptimize-aggressively on GHC 9.0.1.
  49. if [[ $GHC_VER == "9.0.1" ]]; then
  50. make BUILD_DIR=$BUILD_DIR CABAL_OPTS=-v1 v1-install
  51. else
  52. make BUILD_DIR=$BUILD_DIR CABAL_OPTS=-v1 install-bin
  53. fi
  54. travis_fold end "build.agda"
  55. ##############################################################################
  56. # Getting the standard library
  57. travis_fold start "fetch.std-lib"
  58. title "Fetching the standard library"
  59. make up-to-date-std-lib
  60. travis_fold end "fetch.std-lib"
  61. ##############################################################################
  62. # Getting the cubical library
  63. travis_fold start "fetch.cubical"
  64. title "Fetching the cubical library"
  65. make up-to-date-cubical
  66. travis_fold end "fetch.cubical"
  67. ###############################################################################
  68. ## Installing a recent version of Node (see Issue #2192)
  69. #
  70. #cd $HOME
  71. #travis_retry wget https://nodejs.org/download/release/${NODE_VERSION}/${NODE_TARBALL}
  72. #tar xJf ${NODE_TARBALL}
  73. #cd $AGDA_HOME
  74. #echo "*** Node version ***"
  75. #node --version