forked from aptible/supercronic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
47 lines (42 loc) · 1.87 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
sudo: false
dist: trusty
language: go
go: "1.9"
before_install:
- mkdir -p $HOME/gopath/src/github.com/aptible/supercronic
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/aptible/supercronic/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/aptible/supercronic
- cd $TRAVIS_BUILD_DIR
- go get -u github.com/golang/dep/cmd/dep
install:
- make deps
- git clone https://github.com/sstephenson/bats.git --branch v0.4.0 --depth 1 "${HOME}/bats"
- export "PATH=${PATH}:${HOME}/bats/bin"
jobs:
include:
- stage: test
script:
- make fmt
- git diff --exit-code
- make test
- stage: build
script:
- mkdir -p dist
- export GOOS="linux"
- export CGO_ENABLED=0
- for arch in amd64 386 arm arm64; do GOARCH="$arch" go build && file supercronic | grep 'statically linked' && mv supercronic "dist/supercronic-${GOOS}-${arch}"; done
- pushd dist
- ls -lah *
- file *
- sha1sum *
- sha256sum *
- popd
deploy:
provider: releases
api_key:
secure: "MPXVtn7XhcWkkDpDCcPqvfp1klsfGflsMrhBTH5WO2dUD352fJdbHTUi87Yuo+aFib+yNArzFn3cl9ZfUmD7vSSjmxqFjrgcIJT45Qqo4Y+T39JMUo7QuCsBUV4QbLlHMAyA3ZrcpWmpyGC5VgqiRN6D/XCTmB355fMfbF/Wov/shADiLLzYxDRkxUggx2nqBrG1Eo0JfS5Ji/MUbA5dhmOoDnf0YTsu2SWhS1nErj0HTe/j2/o7wG9aM1rQg6sU0DDTarPWNVJn6HNx0E65VzvfZH2v6g0rfLQ3sydeHdtvyS2KxBlCcp7ceJ2VHLuurR9IZTqH8GYA8GYAAZpo2oZF2esqH6tIpTIG5kJJy9Ybzw1o5Q3R3LAY18/IvdiUmfrMUy1Bkai1Lz1nHvcG5azwSOgrZ/hTbby1XPS4TdjbC7tyQXJ/u0ch+qxLOcIwKp/3DiE6nmMXJkCv4hf5YX/AYze2TKtm2uhE2qQF7kQ3tKi64nOBX9N3+mJVthS37JA8Zrak3D/5E4vtul87lahczOCNS2qYcET04Td77HJ1HEGgSnJETvnfG4+8LmLYoIqN3201Vsk585CNVpUY7PjYCxFBRadj7SfHmAq8mEQF7rpM8ELmBirkwta1QQq5Qma49ozCxWcnhnqw9NPRG3oNCrYsVC2APIrkvsOjVPo="
file: "dist/*"
file_glob: true
skip_cleanup: true
on:
tags: true