-
Notifications
You must be signed in to change notification settings - Fork 74
/
.travis.yml
50 lines (50 loc) · 1.81 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
language: bash
dist: trusty
os:
- linux
# Disabling, potentially permanently, given ongoing sadness :crying_cat_face:
# - osx
cache:
directories:
- "${HOME}/bin"
# Disabling, potentially permanently, given ongoing sadness :crying_cat_face:
# osx_image: xcode7.3
env:
global:
- GIMME_TMP="${TRAVIS_BUILD_DIR}/tmp"
- UNAME="$(uname | tr '[:upper:]' '[:lower:]')"
- GO_BOOTSTRAP_VERSION=1.8.3
- GOPATH="${HOME}/gopath"
- PATH="${HOME}/bin:${PATH}"
- SHELLCHECK_URL="https://www.googleapis.com/download/storage/v1/b/shellcheck/o/shellcheck-v0.4.7.linux.x86_64.tar.xz?alt=media"
- SHFMT_URL="https://github.com/mvdan/sh/releases/download/v2.2.0/shfmt_v2.2.0_linux_amd64"
matrix:
- TARGET=native GO_VERSIONS="$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) $(sed -n -e '/^[^#]/p' < .testdata/source-$UNAME)"
- TARGET=arm GO_VERSIONS="master"
- TARGET=arm64 GO_VERSIONS="$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) master"
addons:
apt:
packages:
# install cross compilers for cgo support.
- gcc-aarch64-linux-gnu
- libc6-dev-arm64-cross
before_script:
- mkdir -p "${GIMME_TMP}"
script:
- if [ $UNAME = linux ] && [[ $(shellcheck --version | awk '/^version:/ { print $2 }') != 0.4.7 ]] ; then
curl -sSL -o "${GIMME_TMP}/shellcheck.tar.xz" "${SHELLCHECK_URL}";
tar -C "${HOME}/bin" --exclude="*.txt" --strip-components=1 -xf "${GIMME_TMP}/shellcheck.tar.xz";
shellcheck --version;
fi
- if [ $UNAME = linux ] && [[ $(shfmt -version 2>/dev/null) != v2.2.0 ]] ; then
curl -sSL "${SHFMT_URL}" -o "${HOME}/bin/shfmt";
chmod +x "${HOME}/bin/shfmt";
shfmt -version;
fi
- if [ $UNAME = linux ]; then make lint; fi
- git diff --exit-code
- git diff --cached --exit-code
- ./gimme -h
- ./gimme -V
- ./runtests "${TARGET}" "${GO_BOOTSTRAP_VERSION}" ${GO_VERSIONS}
- ./gimme -l