forked from mattetti/xgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (61 loc) · 2.5 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
---
language: go
sudo: false
# We expect users to use something fairly recent so we test the last two
# versions plus tip. Update these freely as new versions of Go are released.
#
# We choose two versions since official support of Go mirrors this policy:
# Only the current major release (x.y) has full official support.
# The previous major release gets security-only support.
#
# Tip is useful to automatically test a version more recent than the
# the last time .travis.yml was looked at, and (unlikely as it might be)
# to alert us to any real upcoming change in the language that would be
# incompatible with our existing code.
#
# We may choose to test additional versions as time allows,
# as long as the number of entries in the build matrix doesn't exceed ten.
# These additional versions will not be required, so they're advisory only.
# Since Travis runs five jobs at a time, a limit of ten jobs makes sense.
go:
- 1.6.2
- 1.5.4
- 1.4.3
- tip
# Travis runs in a 64 bit environment but beginning with Go 1.5, building a
# 32 bit target is as easy as specifying GOARCH. We test both to accomodate
# users that might be running 32 bit environments and make sure our code
# works for them.
#
# Race detection is valuable for our problems that involve concurrency.
# The race detector isn't supported on 386 though.
env:
- TESTARCH=amd64 RACE=-race
- TESTARCH=386
# Travis doc for the install step says it is for any dependencies of the
# build. We don't have any build dependencies so we can disable this with
# `install: true`. (Actually we have to specify either true or something else
# here because the default step for this is currently `go get -t ./...` which
# doesn't work for us because some of our stub files have invalid Go syntax
# or duplicate definitions of the example files)
install: true
# Configlet tests a number of things like config.json.
# See https://github.com/exercism/configlet.
before_script:
- bin/fetch-configlet
- bin/configlet .
# Our "build" is to run `go test` which is what our users do.
# -cpu 2 is for our problems that involve concurrency to test that they
# perform as expected on multiple cores.
script:
- GOARCH=$TESTARCH RACE=$RACE ./bin/test-without-stubs
# special cases for the build matrix are that go 1.4.3 can't be tested 32 bit
# and that tip is allowed to fail. Broken tips are extremely rare these days
# but anyway, it could happen and it wouldn't be our problem.
matrix:
exclude:
- go: 1.4.3
env: TESTARCH=386
allow_failures:
- go: tip
- go: 1.4.3