config.yml 3.61 KB
Newer Older
Julien Chaumond's avatar
Julien Chaumond committed
1
2
version: 2
jobs:
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    build_py3_torch_and_tf:
        working_directory: ~/pytorch-transformers
        docker:
            - image: circleci/python:3.5
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
            - run: sudo pip install torch
            - run: sudo pip install tensorflow==2.0.0-rc0
            - run: sudo pip install --progress-bar off .
            - run: sudo pip install pytest codecov pytest-cov
            - run: sudo pip install tensorboardX scikit-learn
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
            - run: codecov
thomwolf's avatar
thomwolf committed
18
    build_py3_torch:
thomwolf's avatar
thomwolf committed
19
        working_directory: ~/pytorch-transformers
Julien Chaumond's avatar
Julien Chaumond committed
20
        docker:
21
            - image: circleci/python:3.5
22
        resource_class: xlarge
23
        parallelism: 1
Julien Chaumond's avatar
Julien Chaumond committed
24
25
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
26
            - run: sudo pip install torch
Julien Chaumond's avatar
Julien Chaumond committed
27
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
28
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
29
            - run: sudo pip install tensorboardX scikit-learn
thomwolf's avatar
thomwolf committed
30
31
32
33
34
35
36
37
38
39
40
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
            - run: python -m pytest -sv ./examples/
            - run: codecov
    build_py3_tf:
        working_directory: ~/pytorch-transformers
        docker:
            - image: circleci/python:3.5
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
41
            - run: sudo pip install tensorflow==2.0.0-rc0
thomwolf's avatar
thomwolf committed
42
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
43
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
44
            - run: sudo pip install tensorboardX scikit-learn
thomwolf's avatar
thomwolf committed
45
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
46
            - run: codecov
thomwolf's avatar
thomwolf committed
47
    build_py2_torch:
thomwolf's avatar
thomwolf committed
48
        working_directory: ~/pytorch-transformers
49
        resource_class: large
50
        parallelism: 1
51
52
53
54
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
55
            - run: sudo pip install torch
56
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
57
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
58
59
60
61
62
63
64
65
66
67
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
            - run: codecov
    build_py2_tf:
        working_directory: ~/pytorch-transformers
        resource_class: large
        parallelism: 1
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
68
            - run: sudo pip install tensorflow==2.0.0-rc0
thomwolf's avatar
thomwolf committed
69
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
70
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
71
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
72
            - run: codecov
LysandreJik's avatar
LysandreJik committed
73
74
75
76
77
78
79
80
81
    deploy_doc:
        working_directory: ~/pytorch-transformers
        docker:
            - image: circleci/python:3.5
        steps:
            - add_ssh_keys:
                  fingerprints:
                      - "5b:7a:95:18:07:8c:aa:76:4c:60:35:88:ad:60:56:71"
            - checkout
82
83
            - run: sudo pip install --progress-bar off -r docs/requirements.txt
            - run: sudo pip install --progress-bar off -r requirements.txt
LysandreJik's avatar
LysandreJik committed
84
85
86
87
88
89
            - run: cd docs && make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
                - master
90
workflows:
LysandreJik's avatar
LysandreJik committed
91
92
93
    version: 2
    build_and_test:
        jobs:
thomwolf's avatar
thomwolf committed
94
            - build_py3_torch_and_tf
thomwolf's avatar
thomwolf committed
95
96
97
98
            - build_py3_torch
            - build_py3_tf
            - build_py2_torch
            - build_py2_tf
LysandreJik's avatar
LysandreJik committed
99
            - deploy_doc: *workflow_filters