-
Notifications
You must be signed in to change notification settings - Fork 159
/
.travis.yml
63 lines (54 loc) · 1.52 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
language: go
os:
- linux
- osx
env:
- CLANG=3.9
matrix:
include:
- env: CLANG=3.8
os: linux
- env: CLANG=3.7
os: linux
- env: CLANG=3.6
os: linux
- env: CLANG=3.4
os: linux
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-add-repository "deb http://apt.llvm.org/precise/ llvm-toolchain-precise-$CLANG main"
sudo apt-get update
sudo apt-cache search clang
sudo apt-get install -f -y --force-yes clang-$CLANG lldb-$CLANG
fi
script:
# Run the unit tests first
- |
set -e
echo "" > coverage.txt
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
done
# Now run the integration tests.
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
CLANG_BIN=clang-$CLANG bash run-tests.sh
else
bash run-tests.sh
fi
# These steps are from the README to verify it can be installed and run as
# documented.
- cd /tmp
- export C2GO=$GOPATH/src/github.com/elliotchance/c2go
- c2go $C2GO/tests/misc/hello-world.c > hello-world.go
- go run hello-world.go
- cd -
after_success:
- include_cov=coverage.txt bash <(curl -s https://codecov.io/bash)