-
Notifications
You must be signed in to change notification settings - Fork 159
/
.travis.yml
65 lines (54 loc) · 1.59 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
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
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
rvm get head
fi
script:
- . ./.travis.gofmt.sh
# Run the unit tests first
- |
set -e
echo "" > coverage.txt
go test -tags=integration -race -coverprofile=profile.out -coverpkg ./...
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
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 transpile $C2GO/tests/prime.c
- echo "47" | go run prime.go
- if [ $(c2go -v | wc -l) -ne 1 ]; then exit 1; fi
- if [ $(cat prime.go | wc -l) -eq 0 ]; then exit 1; fi
- if [ $(c2go ast $C2GO/tests/prime.c | wc -l) -eq 0 ]; then exit 1; fi
# Revert the cwd for any cleanup commands.
- cd -
after_success:
- include_cov=coverage.txt bash <(curl -s https://codecov.io/bash)