-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
77 lines (77 loc) · 2.44 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
66
67
68
69
70
71
72
73
74
75
76
77
language: python
sudo: false
dist: xenial
services:
- docker
cache: pip
before_cache:
- chown -R travis:travis $HOME/.cache/pip
stages:
- style
- test
- name: deploy-formatml
if: tag =~ .* AND NOT tag =~ ^codrep-.*
- name: deploy-codrep
if: tag =~ ^codrep-.* AND NOT tag =~ ^codrep-visualizer-.*
- name: deploy-codrep-visualizer
if: tag =~ ^codrep-visualizer-.*
matrix:
include:
- stage: style
python: 3.7
install:
- pip install -r requirements-dev.txt
script:
- make check
- stage: test
python: 3.6
install:
- travis_retry make bblfshd
- pip install --upgrade pip cython codecov
- pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
- pip install dgl
- pip install .
script:
- python -m pytest formatml
- stage: test
python: 3.7
install:
- travis_retry make bblfshd
- pip install --upgrade pip cython codecov
- pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
- pip install dgl
- pip install .
script:
- coverage run --concurrency=multiprocessing -m pytest
- coverage combine
after_success:
- codecov
- stage: deploy-formatml
python: 3.7
script:
- test $(python3 setup.py --version) == $TRAVIS_TAG
- docker build -t srcd/formatml:$TRAVIS_TAG .
- docker tag srcd/formatml:$TRAVIS_TAG srcd/formatml:latest
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push srcd/formatml
- stage: deploy-codrep
python: 3.7
script:
- IMG_NAME=srcd/codrep2019
- TAG=${TRAVIS_TAG#codrep-}
- cd codrep/experiments && docker build -t $IMG_NAME:$TAG .
- docker tag $IMG_NAME:$TAG $IMG_NAME:latest
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $IMG_NAME
- stage: deploy-codrep-visualizer
python: 3.7
script:
- IMG_NAME=srcd/codrep2019-visualizer
- TAG=${TRAVIS_TAG#codrep-visualizer-}
- cd codrep/visualizer && docker build -t $IMG_NAME:$TAG .
- docker tag $IMG_NAME:$TAG $IMG_NAME:latest
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push $IMG_NAME
fast_finish: true
notifications:
email: false