[Git][ghc/ghc][wip/alpine-ci] 7 commits: gitlab-ci: Build alpine release bindists

Ben Gamari gitlab at gitlab.haskell.org
Wed Jun 12 01:06:34 UTC 2019



Ben Gamari pushed to branch wip/alpine-ci at Glasgow Haskell Compiler / GHC


Commits:
52c3d3b9 by Ben Gamari at 2019-06-12T00:58:02Z
gitlab-ci: Build alpine release bindists

- - - - -
39b79271 by Ben Gamari at 2019-06-12T00:58:02Z
base/Event/Poll: Drop POLLRDHUP enum item

Previously the Event enumeration produced by hsc2hs would sometimes
include a currently-unused POLLRDHUP item. This unused binding would
result in a build failure. Drop it.

- - - - -
7dfa2c7e by Ben Gamari at 2019-06-12T00:58:02Z
testsuite: Fix T8602 on musl

Musl wants hash-bangs on all executables.

- - - - -
e4d3761b by Ben Gamari at 2019-06-12T00:58:02Z
testsuite: Ensure T5423 flushes C output buffer

Previously T5423 would fail to flush the printf output buffer.
Consequently it was platform-dependent whether the C or Haskell print
output would be emitted first.

- - - - -
8bf1c800 by Ben Gamari at 2019-06-12T00:58:02Z
testsuite: Flush conc059's printf buffer

Otherwise it the order out the Haskell and C output will be
system-dependent.

- - - - -
7b3a66a6 by Ben Gamari at 2019-06-12T00:58:02Z
testsuite: Ensure that ffi005 output order is predictable

The libc output buffer wasn't being flushed, making the order
system-depedent.

- - - - -
de355bfd by Ben Gamari at 2019-06-12T00:58:02Z
XXX: Test alpine job

- - - - -


11 changed files:

- .gitlab-ci.yml
- libraries/base/GHC/Event/Poll.hsc
- testsuite/tests/concurrent/should_run/conc059.stdout
- testsuite/tests/concurrent/should_run/conc059_c.c
- testsuite/tests/driver/T8602/T8602.script
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/ffi/should_run/ffi005.hs
- testsuite/tests/ffi/should_run/ffi005.stdout
- + testsuite/tests/ffi/should_run/ffi005_c.c
- testsuite/tests/rts/T5423.stdout
- testsuite/tests/rts/T5423_cmm.cmm


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: ac65f31dcffb09cd7ca7aaa70f447fcbb19f427f
+  DOCKER_REV: 7aebd67ecd6bdc0ee89dd4aff5d0bbc5e87a28a1
 
   # Sequential version number capturing the versions of all tools fetched by
   # .gitlab/win32-init.sh.
@@ -535,6 +535,26 @@ release-x86_64-linux-deb8:
     when: always
     expire_in: 2 week
 
+#################################
+# x86_64-linux-alpine
+#################################
+
+release-x86_64-linux-alpine:
+  extends: .validate-linux
+  stage: lint
+  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine:$DOCKER_REV"
+  variables:
+    BUILD_SPHINX_PDF: "NO"
+    TEST_ENV: "x86_64-linux-alpine"
+    BIN_DIST_PREP_TAR_COMP: "bindistprep/ghc-x86_64-alpine-linux.tar.xz"
+    # Can't use ld.gold due to #13958.
+    CONFIGURE_ARGS: "--disable-ld-override"
+  cache:
+    key: linux-x86_64-alpine
+  artifacts:
+    when: always
+    expire_in: 2 week
+
 #################################
 # x86_64-linux-centos7
 #################################


=====================================
libraries/base/GHC/Event/Poll.hsc
=====================================
@@ -162,24 +162,12 @@ newtype Event = Event CShort
              , FiniteBits -- ^ @since 4.7.0.0
              )
 
--- We have to duplicate the whole enum like this in order for the
--- hsc2hs cross-compilation mode to work
-#if defined(POLLRDHUP)
 #{enum Event, Event
  , pollIn    = POLLIN
  , pollOut   = POLLOUT
- , pollRdHup = POLLRDHUP
  , pollErr   = POLLERR
  , pollHup   = POLLHUP
  }
-#else
-#{enum Event, Event
- , pollIn    = POLLIN
- , pollOut   = POLLOUT
- , pollErr   = POLLERR
- , pollHup   = POLLHUP
- }
-#endif
 
 fromEvent :: E.Event -> Event
 fromEvent e = remap E.evtRead  pollIn .|.


=====================================
testsuite/tests/concurrent/should_run/conc059.stdout
=====================================
@@ -1,3 +1,3 @@
-500000
 exiting...
+500000
 exited.


=====================================
testsuite/tests/concurrent/should_run/conc059_c.c
=====================================
@@ -16,6 +16,7 @@ int main(int argc, char *argv[])
     usleep(100000);
 #endif
     printf("exiting...\n");
+    fflush(stdout);
     hs_exit();
     printf("exited.\n");
 #if mingw32_HOST_OS


=====================================
testsuite/tests/driver/T8602/T8602.script
=====================================
@@ -1,3 +1,4 @@
-:! echo 'echo $4 $5 $6; exit 1' > t8602.sh
+:! echo '#!/bin/sh' > t8602.sh
+:! echo 'echo $4 $5 $6; exit 1' >> t8602.sh
 :! chmod +x t8602.sh
 :load A


=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -32,7 +32,7 @@ test('ffi005', [ omit_ways(prof_ways),
                  when(arch('i386'), skip),
                  when(platform('i386-apple-darwin'), expect_broken(4105)),
                  exit_code(3) ],
-               compile_and_run, [''])
+               compile_and_run, ['ffi005_c.c'])
 
 test('ffi006', normal, compile_and_run, [''])
 


=====================================
testsuite/tests/ffi/should_run/ffi005.hs
=====================================
@@ -20,10 +20,12 @@ main = do
 --  putStrLn $ "errno == " ++ show err
 
   putStrLn "\nTesting puts (and withString)"
-  withCString "Test successful" puts
+  hFlush stdout
+  withCString "Test puts successful" puts
+  flushStdout  -- Flush the libc output buffer
 
   putStrLn "\nTesting peekArray0"
-  s <- withCString "Test successful" (peekArray0 (castCharToCChar '\0'))
+  s <- withCString "Test peekArray0 successful" (peekArray0 (castCharToCChar '\0'))
   putStr (map castCCharToChar s)
 
 -- disabled due to use of non-portable constants in arguments to open:
@@ -71,6 +73,7 @@ withBuffer sz m = do
   return s
 
 foreign import ccall puts :: CString -> IO CInt
+foreign import ccall "flush_stdout" flushStdout :: IO ()
 
 -- foreign import ccall "open" open'  :: CString -> CInt -> IO CInt
 -- foreign import ccall "open" open2' :: CString -> CInt -> CInt -> IO CInt


=====================================
testsuite/tests/ffi/should_run/ffi005.stdout
=====================================
@@ -3,9 +3,10 @@ Testing sin==mysin (should return lots of Trues)
 [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True]
 
 Testing puts (and withString)
+Test puts successful
 
 Testing peekArray0
-Test successful
+Test peekArray0 successful
 Testing sin==dynamic_sin (should return lots of Trues)
 [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True]
 
@@ -16,4 +17,3 @@ Testing sin==Id wrapped_sin (should return lots of Trues)
 [True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True,True]
 
 Testing exit
-Test successful


=====================================
testsuite/tests/ffi/should_run/ffi005_c.c
=====================================
@@ -0,0 +1,5 @@
+#include <stdio.h>
+void flush_stdout(void)
+{
+    fflush(stdout);
+}


=====================================
testsuite/tests/rts/T5423.stdout
=====================================
@@ -1,2 +1,2 @@
-120
 111  112  113  114  115  116  117  118  119  120
+120


=====================================
testsuite/tests/rts/T5423_cmm.cmm
=====================================
@@ -12,5 +12,6 @@ test (W_ r1,
  {
     foreign "C" printf("%d  %d  %d  %d  %d  %d  %d  %d  %d  %d\n",
                         r1, r2, r3, r4, r5, r6, r7, r8, r9, r10);
+    foreign "C" fflush(W_[stdout]);
     return (r10);
  }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/6f12aa63c67f8d252f0ad0487a031abb01beadc6...de355bfdcec0853527f51f657f04ad8f48911fe3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/6f12aa63c67f8d252f0ad0487a031abb01beadc6...de355bfdcec0853527f51f657f04ad8f48911fe3
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/20190611/7ae00c88/attachment-0001.html>


More information about the ghc-commits mailing list