config.yml 4.11 KB
Newer Older
Julien Chaumond's avatar
Julien Chaumond committed
1
2
version: 2
jobs:
3
    run_tests_py3_torch_and_tf:
4
        working_directory: ~/transformers
5
6
        docker:
            - image: circleci/python:3.5
7
8
        environment:
            OMP_NUM_THREADS: 1
9
10
11
12
13
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
            - run: sudo pip install torch
14
            - run: sudo pip install tensorflow
15
            - run: sudo pip install --progress-bar off .
16
            - run: sudo pip install pytest codecov pytest-cov pytest-xdist
17
            - run: sudo pip install tensorboardX scikit-learn
18
            - run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
19
            - run: codecov
20
    run_tests_py3_torch:
21
        working_directory: ~/transformers
Julien Chaumond's avatar
Julien Chaumond committed
22
        docker:
23
            - image: circleci/python:3.5
24
25
        environment:
            OMP_NUM_THREADS: 1
26
        resource_class: xlarge
27
        parallelism: 1
Julien Chaumond's avatar
Julien Chaumond committed
28
29
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
30
            - run: sudo pip install torch
Julien Chaumond's avatar
Julien Chaumond committed
31
            - run: sudo pip install --progress-bar off .
32
            - run: sudo pip install pytest codecov pytest-cov pytest-xdist
thomwolf's avatar
thomwolf committed
33
            - run: sudo pip install tensorboardX scikit-learn
34
            - run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
35
            - run: codecov
36
    run_tests_py3_tf:
37
        working_directory: ~/transformers
thomwolf's avatar
thomwolf committed
38
39
        docker:
            - image: circleci/python:3.5
40
41
        environment:
            OMP_NUM_THREADS: 1
thomwolf's avatar
thomwolf committed
42
43
44
45
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
46
            - run: sudo pip install tensorflow
thomwolf's avatar
thomwolf committed
47
            - run: sudo pip install --progress-bar off .
48
            - run: sudo pip install pytest codecov pytest-cov pytest-xdist
thomwolf's avatar
thomwolf committed
49
            - run: sudo pip install tensorboardX scikit-learn
50
            - run: python -m pytest -n 8 --dist=loadfile -s -v ./transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
51
            - run: codecov
52
    run_tests_py3_custom_tokenizers:
53
54
55
56
57
58
        working_directory: ~/transformers
        docker:
            - image: circleci/python:3.5
        steps:
            - checkout
            - run: sudo pip install --progress-bar off .
59
            - run: sudo pip install pytest pytest-xdist
60
            - run: sudo pip install mecab-python3
Julien Chaumond's avatar
Julien Chaumond committed
61
            - run: RUN_CUSTOM_TOKENIZERS=1 python -m pytest -sv ./transformers/tests/tokenization_bert_japanese_test.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    run_examples_py3_torch:
        working_directory: ~/transformers
        docker:
            - image: circleci/python:3.5
        environment:
            OMP_NUM_THREADS: 1
        resource_class: xlarge
        parallelism: 1
        steps:
            - checkout
            - run: sudo pip install torch
            - run: sudo pip install --progress-bar off .
            - run: sudo pip install pytest pytest-xdist
            - run: sudo pip install tensorboardX scikit-learn
            - run: python -m pytest -n 8 --dist=loadfile -s -v ./examples/
LysandreJik's avatar
LysandreJik committed
77
    deploy_doc:
78
        working_directory: ~/transformers
LysandreJik's avatar
LysandreJik committed
79
80
81
82
83
84
85
        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
86
87
            - 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
88
            - run: ./.circleci/deploy.sh
89
    check_repository_consistency:
R茅mi Louf's avatar
R茅mi Louf committed
90
91
92
93
94
95
96
97
98
        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
99
100
101
102
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
Lysandre's avatar
Lysandre committed
103
                - master
104
workflows:
LysandreJik's avatar
LysandreJik committed
105
106
107
    version: 2
    build_and_test:
        jobs:
108
109
110
111
112
113
            - check_repository_consistency
            - run_examples_py3_torch
            - run_tests_py3_custom_tokenizers
            - run_tests_py3_torch_and_tf
            - run_tests_py3_torch
            - run_tests_py3_tf
Lysandre's avatar
Lysandre committed
114
            - deploy_doc: *workflow_filters