-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (51 loc) · 1.58 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
language: go
go: [1.13.x]
git:
depth: 1
cache:
directories:
- output/
- vendor/
- ${GOPATH}/bin
notifications:
email: false
addons:
apt: {}
stages: [test, bundle]
install:
- go version
- go get -d -v all
- go install ./cmd/strict_sdk
os: [linux]
_bundle: &_bundle
stage: bundle
script:
- EXECUTABLE_PATH=./output/$TRAVIS_BRANCH/$STRICT_PLATFORM/$STRICT_ARCHITECTURE/strict
- GOOS=$COMPILE_OS GOARCH=$COMPILE_ARCH go build -o $EXECUTABLE_PATH ./cmd/strict
- RESULT_DIRECTORY=output/$TRAVIS_BRANCH/artifacts
- strict_sdk make -p $STRICT_PLATFORM -a $STRICT_ARCHITECTURE -b -o $RESULT_DIRECTORY -v $TRAVIS_BRANCH -e $EXECUTABLE_PATH
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_OAUTH_TOKEN
file: ./output/$TRAVIS_BRANCH/artifacts/sdk-*-$STRICT_PLATFORM-$STRICT_ARCHITECTURE.tar.gz
file_glob: true
on:
tags: true
jobs:
include:
# Bundles a Strict SDK by using the executable built in the 'build' stage and deploys it to
# the Github releases. The $GITHUB_OAUTH_TOKEN has to be defined.
- name: bundle-osx
env: [STRICT_PLATFORM=osx STRICT_ARCHITECTURE=x86_64 COMPILE_OS=darwin COMPILE_ARCH=amd64]
<<: *_bundle
- name: bundle-linux
env: [STRICT_PLATFORM=windows STRICT_ARCHITECTURE=x86_64 COMPILE_OS=windows COMPILE_ARCH=amd64]
<<: *_bundle
- name: bundle-windows
env: [STRICT_PLATFORM=linux STRICT_ARCHITECTURE=x86_64 COMPILE_OS=linux COMPILE_ARCH=amd64]
<<: *_bundle
# Runs all tests.
- stage: test
name: test
script: go test -v -cover ./...