config.yml 4.07 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
17
            - run: sudo apt-get -y install libmecab-dev mecab mecab-ipadic-utf8 swig
            - run: sudo pip install mecab-python3
18
            - run: python -m pytest -sv ./transformers/tests/ --cov
19
            - run: codecov
thomwolf's avatar
thomwolf committed
20
    build_py3_torch:
21
        working_directory: ~/transformers
Julien Chaumond's avatar
Julien Chaumond committed
22
        docker:
23
            - image: circleci/python:3.5
24
        resource_class: xlarge
25
        parallelism: 1
Julien Chaumond's avatar
Julien Chaumond committed
26
27
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
28
            - run: sudo pip install torch
Julien Chaumond's avatar
Julien Chaumond committed
29
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
30
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
31
            - run: sudo pip install tensorboardX scikit-learn
32
33
            - run: sudo apt-get -y install libmecab-dev mecab mecab-ipadic-utf8 swig
            - run: sudo pip install mecab-python3
34
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
35
36
37
            - run: python -m pytest -sv ./examples/
            - run: codecov
    build_py3_tf:
38
        working_directory: ~/transformers
thomwolf's avatar
thomwolf committed
39
40
41
42
43
44
        docker:
            - image: circleci/python:3.5
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
45
            - run: sudo pip install tensorflow
thomwolf's avatar
thomwolf committed
46
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
47
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
48
            - run: sudo pip install tensorboardX scikit-learn
49
50
            - run: sudo apt-get -y install libmecab-dev mecab mecab-ipadic-utf8 swig
            - run: sudo pip install mecab-python3
51
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
52
            - run: codecov
thomwolf's avatar
thomwolf committed
53
    build_py2_torch:
54
        working_directory: ~/transformers
55
        resource_class: large
56
        parallelism: 1
57
58
59
60
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
61
            - run: sudo pip install torch
62
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
63
            - run: sudo pip install pytest codecov pytest-cov
64
65
            - run: sudo apt-get -y install libmecab-dev mecab mecab-ipadic-utf8 swig
            - run: sudo pip install mecab-python
66
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
67
68
            - run: codecov
    build_py2_tf:
69
        working_directory: ~/transformers
thomwolf's avatar
thomwolf committed
70
71
72
73
74
75
        resource_class: large
        parallelism: 1
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
76
            - run: sudo pip install tensorflow
thomwolf's avatar
thomwolf committed
77
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
78
            - run: sudo pip install pytest codecov pytest-cov
79
80
            - run: sudo apt-get -y install libmecab-dev mecab mecab-ipadic-utf8 swig
            - run: sudo pip install mecab-python
81
            - run: python -m pytest -sv ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
82
            - run: codecov
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
LysandreJik's avatar
LysandreJik committed
95
96
97
98
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
Lysandre's avatar
Lysandre committed
99
                - master
100
workflows:
LysandreJik's avatar
LysandreJik committed
101
102
103
    version: 2
    build_and_test:
        jobs:
thomwolf's avatar
thomwolf committed
104
            - build_py3_torch_and_tf
thomwolf's avatar
thomwolf committed
105
106
107
108
            - build_py3_torch
            - build_py3_tf
            - build_py2_torch
            - build_py2_tf
Lysandre's avatar
Lysandre committed
109
            - deploy_doc: *workflow_filters