-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
43 lines (36 loc) · 1.95 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
sudo: required
dist: trusty
language: c
services:
- docker
before_install:
- |
# pull before running make so we can use intermediate layers as cache
sudo docker pull welder/bdcs-api-rs:latest
script:
- |
set -e
# first compile the project
sudo docker build -f Dockerfile -t welder/bdcs-api-rs:latest --cache-from welder/bdcs-api-rs:latest .
sudo docker tag welder/bdcs-api-rs:latest welder/bdcs-api-rs:$TRAVIS_BUILD_NUMBER
# next build an image for running the tests
sudo docker build -f Dockerfile.test -t welder/bdcs-api-rs-tests:$TRAVIS_BUILD_NUMBER .
# next run all tests under kcov.
# NOTE: using seccomp=unconfined b/c kcov needs the personality() syscall, see
# https://github.com/SimonKagstrom/kcov/issues/151
docker run --rm -it -e "TRAVIS_JOB_ID=$TRAVIS_JOB_ID" \
--security-opt="seccomp=unconfined" \
welder/bdcs-api-rs-tests:$TRAVIS_BUILD_NUMBER
after_success:
- |
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u atodorov -p $DOCKER_PASSWORD
docker push welder/bdcs-api-rs
fi
notifications:
email:
on_failure: change
on_success: never
env:
global:
secure: "NaGi05Fc5Wb/k34kaevbG42/4dGSO/KZas+CZTypeU9BdwCC5DX32nr+vxpDzLUwXjJe1eOItn+cusgeXJmVPSTSfP++mkj+gs6Q3WzN0GBxTuBVKsd2AisWtJWCeiOKBOUpeDeaqGtay7yA4jOhvGhqwU1tp3Gnwq7RotJJtwmFTwarLGGSfHgPoJn6Pd3upAgjSq7+cb8dzZkyI2iEdIIqUWjohzlAXvVkq+UabuHvt6xN+9R0xZB7hdjYDAEp2lgOi48p1wY+tCJyLM9Nj6T2V/sqNmyuWMepYVU5MQM9puoyVUsO2blHn7WHIzwhHACm9R70B7tLzlur1V2PtzbvY6rct34T+SZ0UBeJPlgjh5rM4yKXUXchKAL75mgf+ndi4GI/RqWo7m0bz29kinL7cg7+/8on4SPxOLYy9aXIKyFqSSwqeNQqT5L4RRRNcxSlI8i/7l8WH4KfVg3JKC45fv5sFYao1qwRHCb1uFAAHwedS5BlkazyHVEjPb8XTtXne8WkeIfMSaj1aF6IuMrZqPC+oQ3qNheQ6iNF2twCsIgUXq393r4DvrCDhuD/oFoU5VnsTbW/GUhTsJ/NVPXmlv1rvzhamdv0CiY/ct6qmzJTi3o70gT5n9mFZ8CmD939OJ3TrL5sN+q1janwdnN8skZhRRhMyMLcND8lZ2Q="