Collect build artifacts with S3
authormrkkrp <markkarpov92@gmail.com>
Fri, 30 Mar 2018 10:18:16 +0000 (17:18 +0700)
committerBen Gamari <ben@smart-cactus.org>
Sat, 7 Apr 2018 17:30:15 +0000 (13:30 -0400)
.appveyor.sh
.circleci/config.yml

index 97d0fdb..22cc520 100644 (file)
@@ -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
         ;;
 
     *)
index e42d849..2d0e645 100644 (file)
@@ -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: