[Git][ghc/ghc][master] CI: add JS release and debug builds, regen CI jobs

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Jul 5 02:05:21 UTC 2023



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


Commits:
59c5fe1d by doyougnu at 2023-07-04T22:04:56-04:00
CI: add JS release and debug builds, regen CI jobs

- - - - -


4 changed files:

- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- testsuite/config/ghc
- testsuite/driver/testlib.py


Changes:

=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -228,6 +228,16 @@ debug = vanilla { buildFlavour = SlowValidate
                 , withNuma = True
                 }
 
+jsDebug :: BuildConfig -> BuildConfig
+jsDebug c = c { bignumBackend = Native
+              -- make the job a debug job
+              , buildFlavour   = SlowValidate
+              , withAssertions = True
+              }
+
+jsPerf :: BuildConfig -> BuildConfig
+jsPerf c = c { bignumBackend = Native }
+
 zstdIpe :: BuildConfig
 zstdIpe = vanilla { withZstd = True }
 
@@ -920,10 +930,8 @@ job_groups =
      , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken vanilla))
      , fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt)))
      , validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing)
-     , validateBuilds Amd64 (Linux Debian11) (crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure")
-        )
-        { bignumBackend = Native
-        }
+     , standardBuildsWithConfig Amd64 (Linux Debian11) (jsPerf $ crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure"))
+     , validateBuilds Amd64 (Linux Debian11) (jsDebug $ crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure"))
      , make_wasm_jobs wasm_build_config
      , modifyValidateJobs manual $
          make_wasm_jobs wasm_build_config {bignumBackend = Native}
@@ -998,7 +1006,7 @@ platform_mapping = Map.map go $
     hasReleaseBuild (StandardTriple{}) = True
     hasReleaseBuild (ValidateOnly{}) = False
 
-data BindistInfo = BindistInfo { bindistName :: String }
+data BindistInfo = BindistInfo { _bindistName :: String }
 
 instance ToJSON BindistInfo where
   toJSON (BindistInfo n) = object [ "bindistName" A..= n ]
@@ -1013,6 +1021,7 @@ main = do
     ("metadata":as) -> write_result as platform_mapping
     _ -> error "gen_ci.hs <gitlab|metadata> [file.json]"
 
+write_result :: ToJSON a => [FilePath] -> a -> IO ()
 write_result as obj =
   (case as of
     [] -> B.putStrLn


=====================================
.gitlab/jobs.yaml
=====================================
@@ -1510,6 +1510,68 @@
       "XZ_OPT": "-9"
     }
   },
+  "nightly-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "8 weeks",
+      "paths": [
+        "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-deb11-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "native",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate",
+      "BUILD_FLAVOUR": "slow-validate",
+      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_WRAPPER": "emconfigure",
+      "CROSS_EMULATOR": "js-emulator",
+      "CROSS_TARGET": "javascript-unknown-ghcjs",
+      "TEST_ENV": "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate",
+      "XZ_OPT": "-9"
+    }
+  },
   "nightly-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -2855,6 +2917,70 @@
       "XZ_OPT": "-9"
     }
   },
+  "release-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-release": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "1 year",
+      "paths": [
+        "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-release.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-deb11-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "native",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-release",
+      "BUILD_FLAVOUR": "release",
+      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_WRAPPER": "emconfigure",
+      "CROSS_EMULATOR": "js-emulator",
+      "CROSS_TARGET": "javascript-unknown-ghcjs",
+      "HADRIAN_ARGS": "--hash-unit-ids",
+      "IGNORE_PERF_FAILURES": "all",
+      "TEST_ENV": "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-release",
+      "XZ_OPT": "-9"
+    }
+  },
   "release-x86_64-linux-deb11-release": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -4428,6 +4554,67 @@
       "TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
     }
   },
+  "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": false,
+    "artifacts": {
+      "expire_in": "2 weeks",
+      "paths": [
+        "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate.tar.xz",
+        "junit.xml"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "x86_64-linux-deb11-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "native",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate",
+      "BUILD_FLAVOUR": "slow-validate",
+      "CONFIGURE_ARGS": "--with-intree-gmp",
+      "CONFIGURE_WRAPPER": "emconfigure",
+      "CROSS_EMULATOR": "js-emulator",
+      "CROSS_TARGET": "javascript-unknown-ghcjs",
+      "TEST_ENV": "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-slow-validate"
+    }
+  },
   "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",


=====================================
testsuite/config/ghc
=====================================
@@ -80,6 +80,7 @@ if not config.arch == "javascript":
     config.compile_ways.append('hpc')
     config.run_ways.append('hpc')
 
+# WASM
 if config.arch == "wasm32":
     config.have_process = False
     config.supports_dynamic_libs = False
@@ -269,7 +270,12 @@ def get_compiler_info():
 
     config.have_vanilla   = compiler_supports_way([])
     config.have_dynamic   = compiler_supports_way(['-dynamic'])
-    config.have_profiling = compiler_supports_way(['-prof'])
+
+    # JavaScript doesn't support profiling yet. See #22261
+    if config.arch == "javascript":
+        config.have_profiling = False
+    else:
+        config.have_profiling = compiler_supports_way(['-prof'])
 
     if config.have_profiling:
         config.compile_ways.append('profasm')


=====================================
testsuite/driver/testlib.py
=====================================
@@ -236,6 +236,11 @@ def req_profiling( name, opts ):
     '''Require the profiling libraries (add 'GhcLibWays += p' to mk/build.mk)'''
     if not config.have_profiling:
         opts.expect = 'fail'
+    # many profiling tests must be skipped for the JS backend. That is
+    # because they unexpectedly pass even though the JS backend does not
+    # support profiling yet. See #22251
+    if js_arch():
+        js_skip(name, opts)
 
     # JS backend doesn't support profiling yet
     if arch("js"):



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59c5fe1d4b624423b1c37891710f2757bb58d6af

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59c5fe1d4b624423b1c37891710f2757bb58d6af
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/20230704/faa4f16d/attachment-0001.html>


More information about the ghc-commits mailing list