travis: Cross-compile for arm, arm64 and ppc64le on every build
authorLucas Käldström <lucas.kaldstrom@hotmail.co.uk>
Sat, 13 Aug 2016 09:44:45 +0000 (12:44 +0300)
committerLucas Käldström <lucas.kaldstrom@hotmail.co.uk>
Sat, 13 Aug 2016 09:44:45 +0000 (12:44 +0300)
Cross-compile cni for arm, arm64 and ppc64le with go1.6 only
Allow go tip to fail
Set fast_finish to true, which means travis will instantly return build failure when any of the required builds fail

ref #209

.travis.yml

index fb135c9..f36ae27 100644 (file)
@@ -2,20 +2,39 @@ language: go
 sudo: required
 dist: trusty
 
-
-matrix:
-  include:
-    - go: 1.5.4
-      env: GO15VENDOREXPERIMENT=1
-    - go: 1.6.2
-    - go: tip
-  allow_failures: 
-    - go: tip
+go:
+  - 1.5.4
+  - 1.6.2
+  - tip
 
 env:
   global:
     - TOOLS_CMD=golang.org/x/tools/cmd
     - PATH=$GOROOT/bin:$PATH
+    - GO15VENDOREXPERIMENT=1
+  matrix:
+   - TARGET=amd64
+   - TARGET=arm
+   - TARGET=arm64
+   - TARGET=ppc64le
+
+matrix:
+  fast_finish: true
+  allow_failures: 
+    - go: tip
+  exclude:
+    - go: 1.5.4
+      env: arm
+    - go: 1.5.4
+      env: arm64
+    - go: 1.5.4
+      env: ppc64le
+    - go: tip
+      env: arm
+    - go: tip
+      env: arm64
+    - go: tip
+      env: ppc64le
 
 install:
  - go get ${TOOLS_CMD}/cover
@@ -23,7 +42,12 @@ install:
  - go get github.com/mattn/goveralls
 
 script:
- - ./test
+ - >
+    if [ "${TARGET}" == "amd64" ]; then
+      GOARCH="${TARGET}" ./test;
+    else
+      GOARCH="${TARGET}" ./build;
+    fi
 
 notifications:
   email: false