forked from zeroc-ice/ice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
76 lines (71 loc) · 2.97 KB
/
.travis.yml
File metadata and controls
76 lines (71 loc) · 2.97 KB
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
68
69
70
71
72
73
74
75
76
sudo: true
language: generic
dist: trusty
group: travis_latest
env:
global:
- DOCKER_BASE_TAG=3.7-ubuntu-16.04
- DOCKER_BASE_IMAGE=zerocci/ice-base:${DOCKER_BASE_TAG}
- DOCKER_BUILD_IMAGE=zerocci/ice-travis-build:${TRAVIS_BUILD_NUMBER}
- DOCKER_BUILD_CPP11_IMAGE=zerocci/ice-travis-build:${TRAVIS_BUILD_NUMBER}-cpp11
- MAKEFLAGS="-j3 V=1 OPTIMIZE=no USE_NAMESPACES=no CONFIGS=shared"
- DOCKER_RUN="docker run -it --rm ${DOCKER_BUILD_IMAGE} /bin/bash -c"
- DOCKER_RUN_CPP11="docker run -it --rm ${DOCKER_BUILD_IMAGE}-cpp11 /bin/bash -c"
- ALLTESTS="python allTests.py --protocol=ssl --workers=4"
jobs:
include:
- stage: Build
script:
# see https://github.com/travis-ci/travis-ci/issues/8920
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
- |
echo "FROM ${DOCKER_BASE_IMAGE}" >> Dockerfile
echo "RUN make ${MAKEFLAGS}" >> Dockerfile
- docker build --cache-from ${DOCKER_BASE_IMAGE} -t ${DOCKER_BUILD_IMAGE} .
- docker push ${DOCKER_BUILD_IMAGE}
- stage: Build C++11
script:
# see https://github.com/travis-ci/travis-ci/issues/8920
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
- docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_PASSWORD}"
- |
echo "FROM ${DOCKER_BUILD_IMAGE}" >> Dockerfile
echo "RUN make -C cpp ${MAKEFLAGS} CONFIGS='cpp11-shared'" >> Dockerfile
- docker build --cache-from ${DOCKER_BUILD_IMAGE} -t ${DOCKER_BUILD_CPP11_IMAGE} .
- docker push ${DOCKER_BUILD_CPP11_IMAGE}
- &test-staging
stage: Test
before_script:
# see https://github.com/travis-ci/travis-ci/issues/8920
- python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
script: $DOCKER_RUN "${ALLTESTS} --language=cpp"
env: comment=C++
- <<: *test-staging
script: $DOCKER_RUN_CPP11 "${ALLTESTS} --language=cpp --config=cpp11-shared"
env: comment=C++11
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=csharp"
env: comment=C#
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=java"
env: comment=Java
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=java-compat"
env: comment=Java Compat
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=js"
env: comment=JavaScript
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=php"
env: comment=PHP
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=python"
env: comment=Python
- <<: *test-staging
script: $DOCKER_RUN "${ALLTESTS} --language=ruby"
env: comment=Ruby
notifications:
email: travis-ci@zeroc.com
slack:
secure: TywLzzH1Hx3Pb5I4s4wxbEZ9nOAPkamZDqHBOkpLSNSRa2iSk6n5GcQi5bnw0Ct59oTEytO/8fNP6mYwf5G2rrXGWpcdgSdyLMcUk6ASeO7ANv7xLKhVWbbOoVuZxFJvIG5mTYpCa3R58EtchQErzdyf3rRMN3rq/ZBmocFMcRY=