[commit: ghc] master: Collect build artifacts with S3 (d386cd6)

git at git.haskell.org git at git.haskell.org
Sat Apr 7 19:44:29 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d386cd67662a9ece05fb094252668e3f5f8ce5e2/ghc

>---------------------------------------------------------------

commit d386cd67662a9ece05fb094252668e3f5f8ce5e2
Author: mrkkrp <markkarpov92 at gmail.com>
Date:   Fri Mar 30 17:18:16 2018 +0700

    Collect build artifacts with S3


>---------------------------------------------------------------

d386cd67662a9ece05fb094252668e3f5f8ce5e2
 .appveyor.sh         |  3 ++-
 .circleci/config.yml | 42 ++++++++++++++++++++++--------------------
 2 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/.appveyor.sh b/.appveyor.sh
index 97d0fdb..22cc520 100644
--- a/.appveyor.sh
+++ b/.appveyor.sh
@@ -33,7 +33,8 @@ EOF
     "test")
         make test THREADS=$THREADS
         make binary-dist
-        7z a ghc-windows.zip *.tar.xz
+        curl https://ghc-artifacts.s3.amazonaws.com/tools/ghc-artifact-collector-x86_64-windows --output ghc-artifact-collector
+        ./ghc-artifact-collector *.tar.xz
         ;;
 
     *)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index e42d849..2d0e645 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -69,19 +69,17 @@ aliases:
       # Building bindist takes ~15 minutes without output, account for
       # that.
       no_output_timeout: "30m"
-  - &collectartifacts
+  - &storeartifacts
     run:
-      name: Collect artifacts
-      # We need this because CircleCI expects a path without
-      # wildcards but bindist archive name is not static
+      name: Store artifacts
       command: |
-        mkdir -p /tmp/artifacts
-        pwd
-        find .
-        cp ghc*.tar.xz /tmp/artifacts
-  - &storeartifacts
-    store-artifacts:
-      path: /tmp/artifacts
+        curl https://ghc-artifacts.s3.amazonaws.com/tools/ghc-artifact-collector-$GHC_COLLECTOR_FLAVOR --output ghc-artifact-collector
+        chmod +x ghc-artifact-collector
+        ./ghc-artifact-collector ghc*.tar.xz
+  - &trigger_on_tags
+    filters:
+      tags:
+        only: /^ghc-.*/
 
 jobs:
   "validate-x86_64-linux":
@@ -90,6 +88,7 @@ jobs:
       - image: ghcci/x86_64-linux:0.0.1
     environment:
       <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: x86_64-linux
     steps:
       - checkout
       - *prepare
@@ -99,7 +98,6 @@ jobs:
       - *make
       - *test
       - *bindist
-      - *collectartifacts
       - *storeartifacts
 
   "validate-x86_64-freebsd":
@@ -109,6 +107,7 @@ jobs:
     environment:
       TARGET: FreeBSD
       <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: x86_64-freebsd
     steps:
       - checkout
       - *prepare
@@ -118,7 +117,6 @@ jobs:
       - *make
       - *test
       - *bindist
-      - *collectartifacts
       - *storeartifacts
 
   "validate-x86_64-darwin":
@@ -130,6 +128,7 @@ jobs:
       ac_cv_func_clock_gettime: "no"
     environment:
       <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: x86_64-darwin
     steps:
       - checkout
       - *prepare
@@ -139,7 +138,6 @@ jobs:
       - *make
       - *test
       - *bindist
-      - *collectartifacts
       - *storeartifacts
 
   "validate-hadrian-x86_64-linux":
@@ -218,6 +216,7 @@ jobs:
       - image: ghcci/i386-linux:0.0.1
     environment:
       <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: i386-linux
     steps:
       - checkout
       - *prepare
@@ -227,7 +226,6 @@ jobs:
       - *make
       - *test
       - *bindist
-      - *collectartifacts
       - *storeartifacts
 
   "validate-x86_64-fedora":
@@ -236,6 +234,7 @@ jobs:
       - image: ghcci/x86_64-linux-fedora:0.0.2
     environment:
       <<: *buildenv
+      GHC_COLLECTOR_FLAVOR: x86_64-linux
     steps:
       - checkout
       - *prepare
@@ -245,21 +244,24 @@ jobs:
       - *make
       - *test
       - *bindist
-      - *collectartifacts
       - *storeartifacts
 
 workflows:
   version: 2
   validate:
     jobs:
-    - validate-x86_64-linux
+    - validate-x86_64-linux:
+        *trigger_on_tags
     # FreeBSD disabled: https://github.com/haskell/unix/issues/102
     # - validate-x86_64-freebsd
-    - validate-x86_64-darwin
+    - validate-x86_64-darwin:
+        *trigger_on_tags
     - validate-x86_64-linux-llvm
-    - validate-i386-linux
+    - validate-i386-linux:
+        *trigger_on_tags
     - validate-hadrian-x86_64-linux
-    - validate-x86_64-fedora
+    - validate-x86_64-fedora:
+        *trigger_on_tags
 
   nightly:
     triggers:



More information about the ghc-commits mailing list