CircleCI: Build DWARF-enabled Linux bindists
authorBen Gamari <ben@smart-cactus.org>
Mon, 5 Nov 2018 18:45:59 +0000 (13:45 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 7 Nov 2018 13:09:39 +0000 (08:09 -0500)
.circleci/config.yml
.circleci/prepare-system.sh

index f356901..6fd9b84 100644 (file)
@@ -114,6 +114,27 @@ jobs:
       - *test
       - *store_test_results
 
+  "validate-x86_64-linux-dwarf":
+    resource_class: xlarge
+    docker:
+      - image: ghcci/x86_64-linux:0.0.4
+    environment:
+      <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: x86_64-linux-dwarf
+      ENABLE_DWARF: 1
+      CONFIGURE_OPTS: --enable-dwarf-unwind
+    steps:
+      - checkout
+      - *prepare
+      - *submodules
+      - *boot
+      - *configure_unix
+      - *make
+      - *bindist
+      - *storeartifacts
+      - *test
+      - *store_test_results
+
   "validate-x86_64-freebsd":
     resource_class: xlarge
     docker:
@@ -292,6 +313,8 @@ workflows:
     jobs:
     - validate-x86_64-linux:
         *trigger_on_tags
+    - validate-x86_64-linux-dwarf:
+        *trigger_on_tags
     # FreeBSD disabled: https://github.com/haskell/unix/issues/102
     # - validate-x86_64-freebsd
     - validate-x86_64-darwin:
index dbb1011..39d32f1 100755 (executable)
@@ -22,6 +22,10 @@ BUILD_SPHINX_PDF=$BUILD_SPHINX_PDF
 BeConservative=YES
 EOF
 
+if [[ -z ${ENABLE_DWARF:-} ]]; then
+  echo "GhcLibHcOpts=-g3" >> mk/build.mk
+fi
+
 case "$(uname)" in
   Linux)
     if [[ -n ${TARGET:-} ]]; then
@@ -47,6 +51,9 @@ case "$(uname)" in
       cabal update
       cabal install --reinstall hscolour
       sudo ln -s /home/ghc/.cabal/bin/HsColour /usr/local/bin/HsColour || true
+      if [[ -z ${ENABLE_DWARF:-} ]]; then
+        apt-get install -qy libdw1-dev
+      fi
     fi
     ;;