[Git][ghc/ghc][wip/ci-fixes] 7 commits: gitlab-ci: More intelligent detection of locale availability
Ben Gamari
gitlab at gitlab.haskell.org
Tue Aug 25 18:47:52 UTC 2020
Ben Gamari pushed to branch wip/ci-fixes at Glasgow Haskell Compiler / GHC
Commits:
ddccd3d3 by Ben Gamari at 2020-08-25T14:47:36-04:00
gitlab-ci: More intelligent detection of locale availability
Previously ci.sh would unconditionally use C.UTF-8. However, this fails
on Centos 7, which appears not to provide this locale. Now we first try
C.UTF-8, then try en_US.UTF-8, then fail.
Works around #18607.
- - - - -
23c5a756 by Ben Gamari at 2020-08-25T14:47:36-04:00
gitlab-ci: Rename RELEASE variable to RELEASE_JOB
This interfered with the autoconf variable of the same name, breaking
pre-release builds.
- - - - -
566ac68d by Ben Gamari at 2020-08-25T14:47:36-04:00
gitlab-ci: Bump Windows toolchain version
This should have been done when we bumped the bootstrap compiler to
8.8.4.
- - - - -
72036e1c by Ben Gamari at 2020-08-25T14:47:36-04:00
gitlab-ci: Drop Windows make job
These are a significant burden on our CI resources and end up failing
quite often due to #18274. Here I drop the make jobs during
validaion; it is now run only during the nightly builds.
- - - - -
4597752a by Ben Gamari at 2020-08-25T14:47:37-04:00
testsuite: Drop Windows-specific output for parseTree
The normalise_slashes normaliser should handle this.
- - - - -
5b12bb7c by Ben Gamari at 2020-08-25T14:47:37-04:00
testsuite: Mark T5975[ab] as broken on Windows
Due to #7305.
- - - - -
c4fd8947 by Ben Gamari at 2020-08-25T14:47:37-04:00
gitlab-ci: Fix typo
A small typo in a rule regular expression.
- - - - -
4 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- − testsuite/tests/ghc-api/annotations/parseTree.stdout-mingw32
- testsuite/tests/ghci/scripts/all.T
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -6,7 +6,7 @@ variables:
# Sequential version number capturing the versions of all tools fetched by
# .gitlab/ci.sh.
- WINDOWS_TOOLCHAIN_VERSION: 1
+ WINDOWS_TOOLCHAIN_VERSION: 2
# Disable shallow clones; they break our linting rules
GIT_DEPTH: 0
@@ -49,7 +49,7 @@ workflow:
- if: $CI_COMMIT_TAG
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "wip/marge_bot_batch_merge_job"'
- - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
+ - if: '$CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/'
- if: '$CI_PIPELINE_SOURCE == "web"'
.nightly: &nightly
@@ -67,7 +67,7 @@ workflow:
when: always
expire_in: 1 year
rules:
- - if: '$RELEASE == "yes"'
+ - if: '$RELEASE_JOB == "yes"'
############################################################
# Runner Tags
@@ -896,9 +896,6 @@ validate-x86_64-windows-hadrian:
cache:
key: "x86_64-windows-$WINDOWS_TOOLCHAIN_VERSION"
-validate-x86_64-windows:
- extends: .build-x86_64-windows-make
-
nightly-x86_64-windows:
<<: *nightly
extends: .build-x86_64-windows-make
@@ -909,13 +906,13 @@ nightly-x86_64-windows:
# Normal Windows validate builds are profiled; that won't do for releases.
release-x86_64-windows:
<<: *release
- extends: validate-x86_64-windows
+ extends: .build-x86_64-windows-make
variables:
BUILD_FLAVOUR: "perf"
#
release-x86_64-windows-integer-simple:
<<: *release
- extends: validate-x86_64-windows
+ extends: .build-x86_64-windows-make
variables:
BIGNUM_BACKEND: native
BUILD_FLAVOUR: "perf"
@@ -970,7 +967,7 @@ doc-tarball:
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
dependencies:
- validate-x86_64-linux-deb9-debug
- - validate-x86_64-windows
+ - validate-x86_64-windows-hadrian
variables:
LINUX_BINDIST: "ghc-x86_64-deb9-linux-debug.tar.xz"
WINDOWS_BINDIST: "ghc-x86_64-mingw32.tar.xz"
=====================================
.gitlab/ci.sh
=====================================
@@ -26,9 +26,6 @@ LT_CYAN="1;36"
WHITE="1;37"
LT_GRAY="0;37"
-export LANG=C.UTF-8
-export LC_ALL=C.UTF-8
-
# GitLab Pipelines log section delimiters
# https://gitlab.com/gitlab-org/gitlab-foss/issues/14664
start_section() {
@@ -60,6 +57,30 @@ function run() {
TOP="$(pwd)"
+function setup_locale() {
+ # BSD grep terminates early with -q, consequently locale -a will get a
+ # SIGPIPE and the pipeline will fail with pipefail.
+ shopt -o -u pipefail
+ if locale -a | grep -q C.UTF-8; then
+ # Debian
+ export LANG=C.UTF-8
+ elif locale -a | grep -q C.utf8; then
+ # Fedora calls it this
+ export LANG=C.utf8
+ elif locale -a | grep -q en_US.UTF-8; then
+ # Centos doesn't have C.UTF-8
+ export LANG=en_US.UTF-8
+ else
+ error "Failed to find usable locale"
+ info "Available locales:"
+ locale -a
+ fail "No usable locale, aborting..."
+ fi
+ info "Using locale $LANG..."
+ export LC_ALL=$LANG
+ shopt -o -s pipefail
+}
+
function mingw_init() {
case "$MSYSTEM" in
MINGW32)
@@ -423,6 +444,8 @@ function shell() {
run $cmd
}
+setup_locale
+
# Determine Cabal data directory
case "$(uname)" in
MSYS_*|MINGW*) exe=".exe"; cabal_dir="$APPDATA/cabal" ;;
=====================================
testsuite/tests/ghc-api/annotations/parseTree.stdout-mingw32 deleted
=====================================
@@ -1,160 +0,0 @@
-[(AnnotationTuple.hs:14:20, [p], Solo 1),
- (AnnotationTuple.hs:14:23-29, [p], Solo "hello"),
- (AnnotationTuple.hs:14:35-37, [p], Solo 6.5),
- (AnnotationTuple.hs:14:39, [m], ()),
- (AnnotationTuple.hs:14:41-52, [p], Solo [5, 5, 6, 7]),
- (AnnotationTuple.hs:16:8, [p], Solo 1),
- (AnnotationTuple.hs:16:11-17, [p], Solo "hello"),
- (AnnotationTuple.hs:16:20-22, [p], Solo 6.5),
- (AnnotationTuple.hs:16:24, [m], ()),
- (AnnotationTuple.hs:16:25, [m], ()),
- (AnnotationTuple.hs:16:26, [m], ()), (<no location info>, [m], ())]
-[
-(AK AnnotationTuple.hs:1:1 AnnCloseC = [AnnotationTuple.hs:27:1])
-
-(AK AnnotationTuple.hs:1:1 AnnModule = [AnnotationTuple.hs:3:1-6])
-
-(AK AnnotationTuple.hs:1:1 AnnOpenC = [AnnotationTuple.hs:5:1])
-
-(AK AnnotationTuple.hs:1:1 AnnWhere = [AnnotationTuple.hs:3:30-34])
-
-(AK AnnotationTuple.hs:3:24-28 AnnCloseP = [AnnotationTuple.hs:3:28])
-
-(AK AnnotationTuple.hs:3:24-28 AnnOpenP = [AnnotationTuple.hs:3:24])
-
-(AK AnnotationTuple.hs:6:1-32 AnnAs = [AnnotationTuple.hs:6:28-29])
-
-(AK AnnotationTuple.hs:6:1-32 AnnImport = [AnnotationTuple.hs:6:1-6])
-
-(AK AnnotationTuple.hs:6:1-32 AnnQualified = [AnnotationTuple.hs:6:8-16])
-
-(AK AnnotationTuple.hs:6:1-32 AnnSemi = [AnnotationTuple.hs:7:1])
-
-(AK AnnotationTuple.hs:(8,1)-(11,14) AnnEqual = [AnnotationTuple.hs:8:5])
-
-(AK AnnotationTuple.hs:(8,1)-(11,14) AnnFunId = [AnnotationTuple.hs:8:1-3])
-
-(AK AnnotationTuple.hs:(8,1)-(11,14) AnnSemi = [AnnotationTuple.hs:13:1])
-
-(AK AnnotationTuple.hs:(8,7)-(11,14) AnnIn = [AnnotationTuple.hs:11:7-8])
-
-(AK AnnotationTuple.hs:(8,7)-(11,14) AnnLet = [AnnotationTuple.hs:8:7-9])
-
-(AK AnnotationTuple.hs:9:9-13 AnnEqual = [AnnotationTuple.hs:9:11])
-
-(AK AnnotationTuple.hs:9:9-13 AnnFunId = [AnnotationTuple.hs:9:9])
-
-(AK AnnotationTuple.hs:9:9-13 AnnSemi = [AnnotationTuple.hs:10:9])
-
-(AK AnnotationTuple.hs:10:9-13 AnnEqual = [AnnotationTuple.hs:10:11])
-
-(AK AnnotationTuple.hs:10:9-13 AnnFunId = [AnnotationTuple.hs:10:9])
-
-(AK AnnotationTuple.hs:11:10-14 AnnVal = [AnnotationTuple.hs:11:12])
-
-(AK AnnotationTuple.hs:14:1-72 AnnEqual = [AnnotationTuple.hs:14:5])
-
-(AK AnnotationTuple.hs:14:1-72 AnnFunId = [AnnotationTuple.hs:14:1-3])
-
-(AK AnnotationTuple.hs:14:1-72 AnnSemi = [AnnotationTuple.hs:15:1])
-
-(AK AnnotationTuple.hs:14:7-72 AnnVal = [AnnotationTuple.hs:14:13])
-
-(AK AnnotationTuple.hs:14:19-53 AnnCloseP = [AnnotationTuple.hs:14:53])
-
-(AK AnnotationTuple.hs:14:19-53 AnnOpenP = [AnnotationTuple.hs:14:19])
-
-(AK AnnotationTuple.hs:14:20 AnnComma = [AnnotationTuple.hs:14:21])
-
-(AK AnnotationTuple.hs:14:23-29 AnnComma = [AnnotationTuple.hs:14:33])
-
-(AK AnnotationTuple.hs:14:35-37 AnnComma = [AnnotationTuple.hs:14:38])
-
-(AK AnnotationTuple.hs:14:39 AnnComma = [AnnotationTuple.hs:14:39])
-
-(AK AnnotationTuple.hs:14:41-52 AnnCloseS = [AnnotationTuple.hs:14:52])
-
-(AK AnnotationTuple.hs:14:41-52 AnnOpenS = [AnnotationTuple.hs:14:41])
-
-(AK AnnotationTuple.hs:14:42 AnnComma = [AnnotationTuple.hs:14:43])
-
-(AK AnnotationTuple.hs:14:45 AnnComma = [AnnotationTuple.hs:14:46])
-
-(AK AnnotationTuple.hs:14:48 AnnComma = [AnnotationTuple.hs:14:49])
-
-(AK AnnotationTuple.hs:14:55-72 AnnCloseS = [AnnotationTuple.hs:14:72])
-
-(AK AnnotationTuple.hs:14:55-72 AnnOpenS = [AnnotationTuple.hs:14:55])
-
-(AK AnnotationTuple.hs:14:56-62 AnnComma = [AnnotationTuple.hs:14:63])
-
-(AK AnnotationTuple.hs:14:61-62 AnnCloseP = [AnnotationTuple.hs:14:62])
-
-(AK AnnotationTuple.hs:14:61-62 AnnOpenP = [AnnotationTuple.hs:14:61])
-
-(AK AnnotationTuple.hs:16:1-41 AnnEqual = [AnnotationTuple.hs:16:5])
-
-(AK AnnotationTuple.hs:16:1-41 AnnFunId = [AnnotationTuple.hs:16:1-3])
-
-(AK AnnotationTuple.hs:16:1-41 AnnSemi = [AnnotationTuple.hs:17:1])
-
-(AK AnnotationTuple.hs:16:7-27 AnnCloseP = [AnnotationTuple.hs:16:27])
-
-(AK AnnotationTuple.hs:16:7-27 AnnOpenP = [AnnotationTuple.hs:16:7])
-
-(AK AnnotationTuple.hs:16:8 AnnComma = [AnnotationTuple.hs:16:9])
-
-(AK AnnotationTuple.hs:16:11-17 AnnComma = [AnnotationTuple.hs:16:18])
-
-(AK AnnotationTuple.hs:16:20-22 AnnComma = [AnnotationTuple.hs:16:23])
-
-(AK AnnotationTuple.hs:16:24 AnnComma = [AnnotationTuple.hs:16:24])
-
-(AK AnnotationTuple.hs:16:25 AnnComma = [AnnotationTuple.hs:16:25])
-
-(AK AnnotationTuple.hs:16:26 AnnComma = [AnnotationTuple.hs:16:26])
-
-(AK AnnotationTuple.hs:16:33-41 AnnCloseP = [AnnotationTuple.hs:16:41])
-
-(AK AnnotationTuple.hs:16:33-41 AnnOpenP = [AnnotationTuple.hs:16:33])
-
-(AK AnnotationTuple.hs:16:39-40 AnnCloseP = [AnnotationTuple.hs:16:40])
-
-(AK AnnotationTuple.hs:16:39-40 AnnOpenP = [AnnotationTuple.hs:16:39])
-
-(AK AnnotationTuple.hs:18:1-28 AnnData = [AnnotationTuple.hs:18:1-4])
-
-(AK AnnotationTuple.hs:18:1-28 AnnDcolon = [AnnotationTuple.hs:18:20-21])
-
-(AK AnnotationTuple.hs:18:1-28 AnnFamily = [AnnotationTuple.hs:18:6-11])
-
-(AK AnnotationTuple.hs:18:1-28 AnnSemi = [AnnotationTuple.hs:19:1])
-
-(AK AnnotationTuple.hs:18:23 AnnRarrow = [AnnotationTuple.hs:18:25-26])
-
-(AK AnnotationTuple.hs:18:23-28 AnnRarrow = [AnnotationTuple.hs:18:25-26])
-
-(AK AnnotationTuple.hs:(20,1)-(24,14) AnnFunId = [AnnotationTuple.hs:20:1-5])
-
-(AK AnnotationTuple.hs:(20,1)-(24,14) AnnSemi = [AnnotationTuple.hs:25:1])
-
-(AK AnnotationTuple.hs:(21,7)-(24,14) AnnEqual = [AnnotationTuple.hs:24:7])
-
-(AK AnnotationTuple.hs:(21,7)-(24,14) AnnVbar = [AnnotationTuple.hs:21:7])
-
-(AK AnnotationTuple.hs:21:9-24 AnnComma = [AnnotationTuple.hs:22:7])
-
-(AK AnnotationTuple.hs:21:9-24 AnnLarrow = [AnnotationTuple.hs:21:16-17])
-
-(AK AnnotationTuple.hs:22:9-25 AnnComma = [AnnotationTuple.hs:23:7])
-
-(AK AnnotationTuple.hs:22:9-25 AnnLarrow = [AnnotationTuple.hs:22:16-17])
-
-(AK AnnotationTuple.hs:23:9-24 AnnLarrow = [AnnotationTuple.hs:23:16-17])
-
-(AK AnnotationTuple.hs:26:1-10 AnnDcolon = [AnnotationTuple.hs:26:5-6])
-
-(AK AnnotationTuple.hs:26:1-14 AnnEqual = [AnnotationTuple.hs:26:12])
-]
-
-EOF: Just SrcSpanPoint ".\\AnnotationTuple.hs" 32 1
=====================================
testsuite/tests/ghci/scripts/all.T
=====================================
@@ -141,8 +141,11 @@ test('T5979',
normalise_slashes,
normalise_version("transformers")],
ghci_script, ['T5979.script'])
-test('T5975a', [pre_cmd('touch föøbàr1.hs')], ghci_script, ['T5975a.script'])
-test('T5975b', [pre_cmd('touch föøbàr2.hs'), extra_hc_opts('föøbàr2.hs')],
+test('T5975a',
+ [pre_cmd('touch föøbàr1.hs'), when(opsys('mingw32'), expect_broken(7305))],
+ ghci_script, ['T5975a.script'])
+test('T5975b',
+ [pre_cmd('touch föøbàr2.hs'), extra_hc_opts('föøbàr2.hs'), when(opsys('mingw32'), expect_broken(7305))],
ghci_script, ['T5975b.script'])
test('T6027ghci', normal, ghci_script, ['T6027ghci.script'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/015afc46003f346502d65ecda44e84235bc98126...c4fd8947f4104e7b6d6bf3d320a63a361191bde1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/015afc46003f346502d65ecda44e84235bc98126...c4fd8947f4104e7b6d6bf3d320a63a361191bde1
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/20200825/bed02600/attachment-0001.html>
More information about the ghc-commits
mailing list