[Git][ghc/ghc][ghc-9.0] 3 commits: gitlab-ci: Accept Centos 7 C.utf8 locale

Ben Gamari gitlab at gitlab.haskell.org
Tue Sep 8 19:53:48 UTC 2020



Ben Gamari pushed to branch ghc-9.0 at Glasgow Haskell Compiler / GHC


Commits:
214b2b69 by Ben Gamari at 2020-09-07T20:28:21-04:00
gitlab-ci: Accept Centos 7 C.utf8 locale

Centos apparently has C.utf8 rather than C.UTF-8.

(cherry picked from commit d9f85dd25a26a04d3485470afb3395ee2dec6464)
(cherry picked from commit 9374737005c9fa36a870111f100fe27f9a0efd8e)

- - - - -
b093074e by Ben Gamari at 2020-09-07T20:28:26-04:00
gitlab-ci: Handle distributions without locales

Previously we would assume that the `locale` utility exists. However,
this is not so on Alpine as musl's locale support is essentially
non-existent.

(cherry picked from commit 17cdb7ac3b557a245fee1686e066f9f770ddc21e)
(cherry picked from commit c10ff55fddf8c6708d679e91f3253dc642b91565)

- - - - -
3e55edd9 by Ben Gamari at 2020-09-08T09:46:42-04:00
gitlab-ci: Rename RELEASE variable to RELEASE_JOB

This interfered with the autoconf variable of the same name, breaking
pre-release builds.

(cherry picked from commit 15dca84793d5ec4ff922726477923e40caa075eb)

- - - - -


2 changed files:

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


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -66,7 +66,7 @@ workflow:
     when: always
     expire_in: 1 year
   rules:
-    - if: '$RELEASE == "yes"'
+    - if: '$RELEASE_JOB == "yes"'
 
 ############################################################
 # Runner Tags


=====================================
.gitlab/ci.sh
=====================================
@@ -58,6 +58,12 @@ function run() {
 TOP="$(pwd)"
 
 function setup_locale() {
+  # Musl doesn't provide locale support at all...
+  if ! which locale > /dev/null; then
+    info "No locale executable. Skipping locale setup..."
+    return
+  fi
+
   # BSD grep terminates early with -q, consequently locale -a will get a
   # SIGPIPE and the pipeline will fail with pipefail.
   shopt -o -u pipefail
@@ -70,6 +76,9 @@ function setup_locale() {
   elif locale -a | grep -q en_US.UTF-8; then
     # Centos doesn't have C.UTF-8
     export LANG=en_US.UTF-8
+  elif locale -a | grep -q en_US.utf8; then
+    # Centos doesn't have C.UTF-8
+    export LANG=en_US.utf8
   else
     error "Failed to find usable locale"
     info "Available locales:"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c23275f4dd8999c673da1b9458c68e768e1f72a6...3e55edd97c8eba271f5cb64b9362796791e0e887

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c23275f4dd8999c673da1b9458c68e768e1f72a6...3e55edd97c8eba271f5cb64b9362796791e0e887
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/20200908/ea68aced/attachment-0001.html>


More information about the ghc-commits mailing list