[Git][ghc/ghc][master] 2 commits: gitlab-ci: Add usage message to ci.sh

Marge Bot gitlab at gitlab.haskell.org
Fri Nov 20 07:11:51 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
b739c319 by Ben Gamari at 2020-11-20T02:11:43-05:00
gitlab-ci: Add usage message to ci.sh

- - - - -
802e9180 by Ben Gamari at 2020-11-20T02:11:43-05:00
gitlab-ci: Add VERBOSE environment variable

And change the make build system's default behavior to V=0, greatly
reducing build log sizes.

- - - - -


1 changed file:

- .gitlab/ci.sh


Changes:

=====================================
.gitlab/ci.sh
=====================================
@@ -2,6 +2,8 @@
 # shellcheck disable=SC2230
 
 # This is the primary driver of the GitLab CI infrastructure.
+# Run `ci.sh usage` for usage information.
+
 
 set -e -o pipefail
 
@@ -17,6 +19,62 @@ fi
 
 source $TOP/.gitlab/common.sh
 
+function usage() {
+  cat <<EOF
+$0 - GHC continuous integration driver
+
+Common Modes:
+
+  usage         Show this usage message.
+  setup         Prepare environment for a build.
+  configure     Run ./configure.
+  clean         Clean the tree
+  shell         Run an interactive shell with a configured build environment.
+
+Make build system:
+
+  build_make    Build GHC via the make build system
+  test_make     Test GHC via the make build system
+
+Hadrian build system
+  build_hadrian Build GHC via the Hadrian build system
+  test_hadrian  Test GHC via the Hadrian build system
+
+
+Environment variables affecting both build systems:
+
+  VERBOSE           Set to non-empty for verbose build output
+  MSYSTEM           (Windows-only) Which platform to build form (MINGW64 or MINGW32).
+
+Environment variables determining build configuration of Make system:
+
+  BUILD_FLAVOUR     Which flavour to build.
+  BUILD_SPHINX_HTML Whether to build Sphinx HTML documentation.
+  BUILD_SPHINX_PDF  Whether to build Sphinx PDF documentation.
+  INTEGER_LIBRARY   Which integer library to use (integer-simple or integer-gmp).
+  HADDOCK_HYPERLINKED_SOURCES
+                    Whether to build hyperlinked Haddock sources.
+  TEST_TYPE         Which test rule to run.
+
+Environment variables determining build configuration of Hadrian system:
+
+  BUILD_FLAVOUR     Which flavour to build.
+
+Environment variables determining bootstrap toolchain (Linux):
+
+  GHC           Path of GHC executable to use for bootstrapping.
+  CABAL         Path of cabal-install executable to use for bootstrapping.
+  ALEX          Path of alex executable to use for bootstrapping.
+  HAPPY         Path of alex executable to use for bootstrapping.
+
+Environment variables determining bootstrap toolchain (non-Linux):
+
+  GHC_VERSION   Which GHC version to fetch for bootstrapping.
+  CABAL_INSTALL_VERSION
+                Cabal-install version to fetch for bootstrapping.
+EOF
+}
+
 function setup_locale() {
   # Musl doesn't provide locale support at all...
   if ! which locale > /dev/null; then
@@ -341,6 +399,11 @@ function build_make() {
   if [[ -z "$BIN_DIST_PREP_TAR_COMP" ]]; then
     fail "BIN_DIST_PREP_TAR_COMP is not set"
   fi
+  if [[ -n "$VERBOSE" ]]; then
+    MAKE_ARGS="$MAKE_ARGS V=1"
+  else
+    MAKE_ARGS="$MAKE_ARGS V=0"
+  fi
 
   echo "include mk/flavours/${BUILD_FLAVOUR}.mk" > mk/build.mk
   echo 'GhcLibHcOpts+=-haddock' >> mk/build.mk
@@ -434,6 +497,7 @@ function clean() {
 
 function run_hadrian() {
   if [ -z "$BIGNUM_BACKEND" ]; then BIGNUM_BACKEND="gmp"; fi
+  if [ -n "$VERBOSE" ]; then HADRIAN_ARGS="$HADRIAN_ARGS -V"; fi
   run hadrian/build-cabal \
     --flavour="$BUILD_FLAVOUR" \
     -j"$cores" \
@@ -476,6 +540,7 @@ esac
 set_toolchain_paths
 
 case $1 in
+  usage) usage ;;
   setup) setup && cleanup_submodules ;;
   configure) configure ;;
   build_make) build_make ;;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9f40cf6ca9fb24dbc55f7eae43e2b89aa12bf251...802e9180dd9a9a88c4e8869f0de1048e1edd6343

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9f40cf6ca9fb24dbc55f7eae43e2b89aa12bf251...802e9180dd9a9a88c4e8869f0de1048e1edd6343
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201120/511efb5f/attachment-0001.html>


More information about the ghc-commits mailing list