config.yml 4.23 KB
Newer Older
Julien Chaumond's avatar
Julien Chaumond committed
1
2
version: 2
jobs:
3
    build_py3_torch_and_tf:
4
        working_directory: ~/transformers
5
6
7
8
9
10
11
        docker:
            - image: circleci/python:3.5
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
            - run: sudo pip install torch
12
            - run: sudo pip install tensorflow
13
14
15
            - run: sudo pip install --progress-bar off .
            - run: sudo pip install pytest codecov pytest-cov
            - run: sudo pip install tensorboardX scikit-learn
16
            - run: python -m pytest -sv ./transformers/tests/ --cov
17
            - run: codecov
thomwolf's avatar
thomwolf committed
18
    build_py3_torch:
19
        working_directory: ~/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
30
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
31
32
33
            - run: python -m pytest -sv ./examples/
            - run: codecov
    build_py3_tf:
34
        working_directory: ~/transformers
thomwolf's avatar
thomwolf committed
35
36
37
38
39
40
        docker:
            - image: circleci/python:3.5
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
41
            - run: sudo pip install tensorflow
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
45
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
46
            - run: codecov
thomwolf's avatar
thomwolf committed
47
    build_py2_torch:
48
        working_directory: ~/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
58
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
59
60
            - run: codecov
    build_py2_tf:
61
        working_directory: ~/transformers
thomwolf's avatar
thomwolf committed
62
63
64
65
66
67
        resource_class: large
        parallelism: 1
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
68
            - run: sudo pip install tensorflow
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
71
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
72
            - run: codecov
73
74
75
76
77
78
79
80
81
    build_py3_custom_tokenizers:
        working_directory: ~/transformers
        docker:
            - image: circleci/python:3.5
        steps:
            - checkout
            - run: sudo pip install --progress-bar off .
            - run: sudo pip install pytest
            - run: sudo pip install mecab-python3
Julien Chaumond's avatar
Julien Chaumond committed
82
            - run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./transformers/tests/tokenization_bert_japanese_test.py
LysandreJik's avatar
LysandreJik committed
83
    deploy_doc:
84
        working_directory: ~/transformers
LysandreJik's avatar
LysandreJik committed
85
86
87
88
89
90
91
        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
92
93
            - run: sudo pip install --progress-bar off -r docs/requirements.txt
            - run: sudo pip install --progress-bar off -r requirements.txt
Lysandre's avatar
Lysandre committed
94
            - run: ./.circleci/deploy.sh
R茅mi Louf's avatar
R茅mi Louf committed
95
96
97
98
99
100
101
102
103
104
    repository_consistency:
        working_directory: ~/transformers
        docker:
            - image: circleci/python:3.5
        resource_class: small
        parallelism: 1
        steps:
            - checkout
            - run: sudo pip install requests
            - run: python ./utils/link_tester.py
LysandreJik's avatar
LysandreJik committed
105
106
107
108
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
Lysandre's avatar
Lysandre committed
109
                - master
110
workflows:
LysandreJik's avatar
LysandreJik committed
111
112
113
    version: 2
    build_and_test:
        jobs:
R茅mi Louf's avatar
R茅mi Louf committed
114
            - repository_consistency
Julien Chaumond's avatar
Julien Chaumond committed
115
            - build_py3_custom_tokenizers
thomwolf's avatar
thomwolf committed
116
            - build_py3_torch_and_tf
thomwolf's avatar
thomwolf committed
117
118
119
120
            - build_py3_torch
            - build_py3_tf
            - build_py2_torch
            - build_py2_tf
Lysandre's avatar
Lysandre committed
121
            - deploy_doc: *workflow_filters