config.yml 2.97 KB
Newer Older
Julien Chaumond's avatar
Julien Chaumond committed
1
2
version: 2
jobs:
thomwolf's avatar
thomwolf committed
3
    build_py3_torch:
thomwolf's avatar
thomwolf committed
4
        working_directory: ~/pytorch-transformers
Julien Chaumond's avatar
Julien Chaumond committed
5
        docker:
6
            - image: circleci/python:3.5
7
        resource_class: xlarge
8
        parallelism: 1
Julien Chaumond's avatar
Julien Chaumond committed
9
10
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
11
            - run: sudo pip install torch
Julien Chaumond's avatar
Julien Chaumond committed
12
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
13
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
14
            - run: sudo pip install tensorboardX scikit-learn
thomwolf's avatar
thomwolf committed
15
16
17
18
19
20
21
22
23
24
25
            - 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
26
            - run: sudo pip install tensorflow==2.0.0-rc0
thomwolf's avatar
thomwolf 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
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
31
            - run: codecov
thomwolf's avatar
thomwolf committed
32
    build_py2_torch:
thomwolf's avatar
thomwolf committed
33
        working_directory: ~/pytorch-transformers
34
        resource_class: large
35
        parallelism: 1
36
37
38
39
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
thomwolf's avatar
thomwolf committed
40
            - run: sudo pip install torch
41
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
42
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
43
44
45
46
47
48
49
50
51
52
            - 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
53
            - run: sudo pip install tensorflow==2.0.0-rc0
thomwolf's avatar
thomwolf committed
54
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
55
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
56
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
57
            - run: codecov
LysandreJik's avatar
LysandreJik committed
58
59
60
61
62
63
64
65
66
    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
67
68
            - 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
69
70
71
72
73
74
            - run: cd docs && make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
                - master
75
workflows:
LysandreJik's avatar
LysandreJik committed
76
77
78
    version: 2
    build_and_test:
        jobs:
thomwolf's avatar
thomwolf committed
79
80
81
82
            - build_py3_torch
            - build_py3_tf
            - build_py2_torch
            - build_py2_tf
LysandreJik's avatar
LysandreJik committed
83
            - deploy_doc: *workflow_filters