forked from scionproto/scion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
57 lines (53 loc) · 1.92 KB
/
circle.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
machine:
python:
version: 3.5.1
services:
- docker
environment:
BASE_DIR: $HOME/go/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
ARTIFACTS: circleci.${CIRCLE_PROJECT_REPONAME}.${CIRCLE_PR_NUMBER:-$CIRCLE_BRANCH}.build${CIRCLE_BUILD_NUM}
general:
build_dir:
../../../$BASE_DIR
checkout:
post:
- mkdir -p $(dirname $BASE_DIR) && ln -fs $HOME/$CIRCLE_PROJECT_REPONAME $BASE_DIR:
pwd: /
- |
echo '
export GOPATH=$GOPATH:$HOME/go
export GOBIN=${GOPATH%%:*}/bin
export PATH=/usr/lib/go-1.6/bin:$GOBIN:$PATH
' >> ~/.circlerc
- git submodule sync
- git submodule update --init sub/web sub/lwip sub/lwip-contrib/
dependencies:
cache_directories:
- "~/cache"
override:
- docker/cache.sh restore
- mv ~/cache ~/cache.old; mkdir ~/cache
- sudo apt-get install -y clang-3.4 capnproto realpath
- ./deps.sh golang
- make -s go
- ./docker.sh build
- docker/cache.sh save
test:
override:
# Go isn't installed in docker, so run the tests outside.
- ./scion.sh coverage go
- ./scion.sh golint
- ./docker.sh run -c "./scion.sh coverage py"
- ./docker.sh run -c "./scion.sh lint"
- ./docker.sh run -c "make -f sphinx-doc/Makefile clean html"
- ./docker.sh run -c "make -s install clean && docker/integration_test.sh"
- ./docker.sh run -c "cd sub/web && ./manage.py test"
post:
- mkdir "$ARTIFACTS"
- mv htmlcov "$ARTIFACTS"/coverage
- mv sphinx-doc/_build/html/ "$ARTIFACTS"/docs
- cp logs/nosetests.xml "$CIRCLE_TEST_REPORTS"
- mv logs "$ARTIFACTS"/
- mv go/gocover.html "$ARTIFACTS"/
- docker run --privileged scion -c "tar -cf - gen" | tar -xf - -C "$ARTIFACTS"/
- tar czf "${CIRCLE_ARTIFACTS}/${ARTIFACTS}.tar.gz" "${ARTIFACTS}"