[Git][ghc/ghc][master] 2 commits: gitlab-ci: Fix copy-paste error

Marge Bot gitlab at gitlab.haskell.org
Sat Dec 5 14:06:09 UTC 2020



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


Commits:
e0b08c5f by Ben Gamari at 2020-12-03T13:01:47-05:00
gitlab-ci: Fix copy-paste error

Also be more consistent in quoting.

- - - - -
33ec3a06 by Ben Gamari at 2020-12-03T23:11:31-05:00
gitlab-ci: Run linters through ci.sh

Ensuring that the right toolchain is used.

- - - - -


2 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -299,12 +299,11 @@ hadrian-ghc-in-ghci:
   tags:
     - x86_64-linux
   script:
+    - git clean -xdf && git submodule foreach git clean -xdf
     - .gitlab/ci.sh setup
+    - .gitlab/ci.sh configure
     - cabal update
     - cd hadrian; cabal new-build -j`../mk/detect-cpu-count.sh` --with-compiler=$GHC --project-file=ci.project; cd ..
-    - git clean -xdf && git submodule foreach git clean -xdf
-    - ./boot
-    - ./configure $CONFIGURE_ARGS
     # Load ghc-in-ghci then immediately exit and check the modules loaded
     - echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
   after_script:
@@ -345,9 +344,13 @@ hadrian-ghc-in-ghci:
 
 lint-base:
   extends: .lint-params
+  variables:
+    BUILD_FLAVOUR: default
   script:
-    - hadrian/build -c -j stage1:lib:base
-    - hadrian/build -j lint:base
+    - .gitlab/ci.sh setup
+    - .gitlab/ci.sh configure
+    - .gitlab/ci.sh run_hadrian stage1:lib:base
+    - .gitlab/ci.sh run_hadrian lint:base
 
 ############################################################
 # Validation via Pipelines (make)


=====================================
.gitlab/ci.sh
=====================================
@@ -168,13 +168,13 @@ function show_tool() {
 }
 
 function set_toolchain_paths() {
-  needs_toolchain=1
+  needs_toolchain="1"
   case "$(uname)" in
     Linux) needs_toolchain="0" ;;
     *) ;;
   esac
 
-  if [[ "$needs_toolchain" = 1 ]]; then
+  if [[ "$needs_toolchain" = "1" ]]; then
       # These are populated by setup_toolchain
       GHC="$toolchain/bin/ghc$exe"
       CABAL="$toolchain/bin/cabal$exe"
@@ -185,9 +185,9 @@ function set_toolchain_paths() {
       # we provide these handy fallbacks in case the
       # script isn't run from within a GHC CI docker image.
       if [ -z "$GHC" ]; then GHC="$(which ghc)"; fi
-      if [ -z "$CABAL" ]; then GHC="$(which cabal)"; fi
-      if [ -z "$HAPPY" ]; then GHC="$(which happy)"; fi
-      if [ -z "$ALEX" ]; then GHC="$(which alex)"; fi
+      if [ -z "$CABAL" ]; then CABAL="$(which cabal)"; fi
+      if [ -z "$HAPPY" ]; then HAPPY="$(which happy)"; fi
+      if [ -z "$ALEX" ]; then ALEX="$(which alex)"; fi
   fi
 
   export GHC
@@ -204,7 +204,7 @@ function setup() {
       cp -Rf cabal-cache/* "$cabal_dir"
   fi
 
-  if [[ -n "$needs_toolchain" ]]; then
+  if [[ "$needs_toolchain" = "1" ]]; then
     setup_toolchain
   fi
   case "$(uname)" in
@@ -442,9 +442,6 @@ function test_make() {
 }
 
 function build_hadrian() {
-  if [ -z "$BUILD_FLAVOUR" ]; then
-    fail "BUILD_FLAVOUR not set"
-  fi
   if [ -z "$BIN_DIST_NAME" ]; then
     fail "BIN_DIST_NAME not set"
   fi
@@ -506,6 +503,9 @@ function clean() {
 }
 
 function run_hadrian() {
+  if [ -z "$BUILD_FLAVOUR" ]; then
+    fail "BUILD_FLAVOUR not set"
+  fi
   if [ -z "$BIGNUM_BACKEND" ]; then BIGNUM_BACKEND="gmp"; fi
   if [ -n "$VERBOSE" ]; then HADRIAN_ARGS="$HADRIAN_ARGS -V"; fi
   run hadrian/build-cabal \
@@ -575,7 +575,7 @@ case $1 in
     test_hadrian || res=$?
     push_perf_notes
     exit $res ;;
-  run_hadrian) run_hadrian $@ ;;
+  run_hadrian) shift; run_hadrian $@ ;;
   perf_test) run_perf_test ;;
   clean) clean ;;
   shell) shell $@ ;;



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/41c64eb5db50c80e110e47b7ab1c1ee18dada46b...33ec3a0600fe8c009ab8ed6d86941a8fd88fb033

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/41c64eb5db50c80e110e47b7ab1c1ee18dada46b...33ec3a0600fe8c009ab8ed6d86941a8fd88fb033
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/20201205/cebdda75/attachment-0001.html>


More information about the ghc-commits mailing list