This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
101 lines (92 loc) · 2.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
language: go
go:
- 1.12.x
go_import_path: github.com/kabanero-io/kabanero-command-line
services:
- docker
# skip the default language's install and script steps, we implement job stages instead
install: skip
script: skip
stages:
- name: lint
- name: test
- name: deploy
if: tag IS present
install-win-req: &install-win-req
install:
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi
test-template: &test-template
<<: *install-win-req
stage: test
script: make test
standard-deploy-template: &standard-deploy-template
stage: deploy
os: linux
script:
- make ARCH=$ARCH VERSION=${TRAVIS_TAG} $PACKAGE
- make deploy
deploy:
provider: releases
skip_cleanup: true
api_key: "$GITHUB_OAUTH_TOKEN"
file: package/*
file_glob: true
on:
branch: master
tags: true
jobs:
include:
- name: Lint
stage: lint
os: linux
script: make lint
- <<: *test-template
name: Full Test on Linux
os: linux
- <<: *test-template
name: Unit Test on MacOS
os: osx
env:
- CGO_ENABLED=1
# script: make unittest
- <<: *test-template
name: Unit Test on Windows
os: windows
# script: make unittest
- name: Deploy Release osx
stage: deploy
os: osx
env:
- CGO_ENABLED=1
script:
- make VERSION=${TRAVIS_TAG} package-osx
- make deploy
before_deploy:
- mv package/kabanero-${TRAVIS_TAG}-darwin-amd64.tar "package/kabanero-${TRAVIS_TAG}-macos-amd64.tar"
- mv package/kabanero-${TRAVIS_TAG}-darwin-amd64.tar.gz "package/kabanero-${TRAVIS_TAG}-homebrew-amd64.tar.gz"
deploy:
provider: releases
skip_cleanup: true
api_key: "$GITHUB_OAUTH_TOKEN"
file: package/*
file_glob: true
on:
branch: master
tags: true
- <<: *standard-deploy-template
name: Deploy Release win/linux
env:
- ARCH=amd64
- PACKAGE=package-win-and-linux
- <<: *standard-deploy-template
name: Deploy Release P
arch: ppc64le
env:
- ARCH=ppc64le
- PACKAGE=package-pz
- <<: *standard-deploy-template
name: Deploy Release Z
arch: s390x
env:
- ARCH=s390x
- PACKAGE=package-pz