summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-25 17:56:07 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-20 02:11:43 -0500
commitb739c319dd56fa2aabd8007cc200eafb3c7651a7 (patch)
tree055a87fbe72777dadc1c2d83ce74678709688241
parent9f40cf6ca9fb24dbc55f7eae43e2b89aa12bf251 (diff)
downloadhaskell-b739c319dd56fa2aabd8007cc200eafb3c7651a7.tar.gz
gitlab-ci: Add usage message to ci.sh
-rwxr-xr-x.gitlab/ci.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index b1c53ded2d..5bcc6f5c5b 100755
--- a/.gitlab/ci.sh
+++ b/.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,61 @@ 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:
+
+ 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
@@ -476,6 +533,7 @@ esac
set_toolchain_paths
case $1 in
+ usage) usage ;;
setup) setup && cleanup_submodules ;;
configure) configure ;;
build_make) build_make ;;