2016-10-17 17:42:20 +02:00
|
|
|
go_import_path: github.com/minio/minio
|
2016-09-29 03:49:16 +02:00
|
|
|
|
2015-04-12 02:23:13 +02:00
|
|
|
language: go
|
2016-01-15 03:17:24 +01:00
|
|
|
|
2019-07-10 03:32:39 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- shellcheck
|
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2018-08-19 22:57:18 +02:00
|
|
|
# this ensures PRs based on a local branch are not built twice
|
|
|
|
# the downside is that a PR targeting a different branch is not built
|
|
|
|
# but as a workaround you can add the branch to this list
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2018-07-03 18:42:19 +02:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2018-10-18 05:18:53 +02:00
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
2018-07-03 18:42:19 +02:00
|
|
|
env:
|
|
|
|
- ARCH=x86_64
|
2019-01-09 01:53:04 +01:00
|
|
|
- CGO_ENABLED=0
|
2019-03-19 21:50:59 +01:00
|
|
|
- GO111MODULE=on
|
2019-04-05 08:30:31 +02:00
|
|
|
# Enable build cache
|
|
|
|
# https://restic.net/blog/2018-09-02/travis-build-cache
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/go-build
|
|
|
|
- $HOME/gopath/pkg/mod
|
|
|
|
- $HOME/go/pkg/mod
|
|
|
|
|
2019-07-10 03:32:39 +02:00
|
|
|
go: 1.12.5
|
2018-07-03 18:42:19 +02:00
|
|
|
script:
|
|
|
|
- make
|
|
|
|
- diff -au <(gofmt -s -d cmd) <(printf "")
|
|
|
|
- diff -au <(gofmt -s -d pkg) <(printf "")
|
2019-01-09 01:53:04 +01:00
|
|
|
- for d in $(go list ./... | grep -v browser); do CGO_ENABLED=1 go test -v -race --timeout 15m "$d"; done
|
2019-01-22 04:57:23 +01:00
|
|
|
- make verifiers
|
|
|
|
- make crosscompile
|
2018-08-28 10:27:01 +02:00
|
|
|
- make verify
|
2018-07-03 18:42:19 +02:00
|
|
|
- make coverage
|
|
|
|
- cd browser && yarn && yarn test && cd ..
|
2019-07-10 03:32:39 +02:00
|
|
|
- bash -c 'shopt -s globstar; shellcheck mint/**/*.sh'
|
|
|
|
|
2018-10-18 05:18:53 +02:00
|
|
|
- os: windows
|
|
|
|
env:
|
|
|
|
- ARCH=x86_64
|
2019-01-09 01:53:04 +01:00
|
|
|
- CGO_ENABLED=0
|
2019-04-03 03:28:39 +02:00
|
|
|
- GO111MODULE=on
|
2019-07-10 03:32:39 +02:00
|
|
|
go: 1.12.5
|
2018-10-18 05:18:53 +02:00
|
|
|
script:
|
|
|
|
- go build --ldflags="$(go run buildscripts/gen-ldflags.go)" -o %GOPATH%\bin\minio.exe
|
|
|
|
- bash buildscripts/go-coverage.sh
|
2016-01-15 03:17:24 +01:00
|
|
|
|
2018-12-14 08:37:46 +01:00
|
|
|
before_script:
|
|
|
|
# Add an IPv6 config - see the corresponding Travis issue
|
|
|
|
# https://github.com/travis-ci/travis-ci/issues/8361
|
|
|
|
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'; fi
|
|
|
|
|
2018-03-23 10:06:20 +01:00
|
|
|
before_install:
|
2019-03-07 01:05:49 +01:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then nvm install 11.10.1 ; fi
|
2018-03-23 10:06:20 +01:00
|
|
|
|
2016-08-05 01:48:50 +02:00
|
|
|
after_success:
|
2018-07-21 03:39:55 +02:00
|
|
|
- bash <(curl -s https://codecov.io/bash)
|