forked from Hammond95/gimme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (74 loc) · 2.38 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
language: bash
dist: xenial
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:
- SHFMT_VERSION="v3.5.1"
- SHCHK_VERSION="v0.8.0"
- GIMME_TMP="${TRAVIS_BUILD_DIR}/tmp"
- UNAME="$(uname | tr '[:upper:]' '[:lower:]')"
- GO_BOOTSTRAP_VERSION=1.18.6
- GOPATH="${HOME}/gopath"
- PATH="${HOME}/bin:${PATH}"
- SHFMT_URL="https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/shfmt_${SHFMT_VERSION}_linux_amd64"
- SHELLCHECK_URL="https://github.com/koalaman/shellcheck/releases/download/${SHCHK_VERSION}/shellcheck-${SHCHK_VERSION}.linux.x86_64.tar.xz"
matrix:
- env:
TARGET: "native"
GO_VERSIONS: "$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) $(sed -n -e '/^[^#]/p' < .testdata/source-$UNAME)"
addons:
apt:
packages:
# install cross compilers for cgo support.
- gcc-arm-linux-gnueabi
- gcc
- binutils-arm-linux-gnueabi
- env:
TARGET: "arm"
GO_VERSIONS: "master"
addons:
apt:
packages:
# install cross compilers for cgo support.
- gcc-arm-linux-gnueabi
- gcc
- binutils-arm-linux-gnueabi
- env:
TARGET: "arm64"
GO_VERSIONS: "$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) master"
GIMME_DEBUG: "true"
addons:
apt:
packages:
# install cross compilers for cgo support.
- gcc-arm*
before_script:
- mkdir -p "${GIMME_TMP}"
- sudo apt install gcc-arm*
script:
- if [ $UNAME = linux ] && [[ "$(shellcheck --version | awk '/^version:/ { print $2 }')" != "$SHCHK_VERSION" ]] ; 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) != v3.5.1 ]] ; 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}
- ls -la "$HOME/.gimme/envs/"
- ./gimme -l