config.yml 1.79 KB
Newer Older
Julien Chaumond's avatar
Julien Chaumond committed
1
2
version: 2
jobs:
3
    build_py3:
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
11
        steps:
            - checkout
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
12
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
13
            - run: sudo pip install tensorboardX scikit-learn
thomwolf's avatar
thomwolf committed
14
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
15
            - run: python -m pytest -sv ./examples/
thomwolf's avatar
thomwolf committed
16
            - run: codecov
17
    build_py2:
thomwolf's avatar
thomwolf committed
18
        working_directory: ~/pytorch-transformers
19
        resource_class: large
20
        parallelism: 1
21
22
23
24
25
        docker:
            - image: circleci/python:2.7
        steps:
            - checkout
            - run: sudo pip install --progress-bar off .
thomwolf's avatar
thomwolf committed
26
            - run: sudo pip install pytest codecov pytest-cov
thomwolf's avatar
thomwolf committed
27
            - run: python -m pytest -sv ./pytorch_transformers/tests/ --cov
thomwolf's avatar
thomwolf committed
28
            - run: codecov
LysandreJik's avatar
LysandreJik committed
29
30
31
32
33
34
35
36
37
    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
38
39
            - 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
40
41
42
43
44
45
            - run: cd docs && make clean && make html && scp -r -oStrictHostKeyChecking=no _build/html/* $doc:$dir
workflow_filters: &workflow_filters
    filters:
        branches:
            only:
                - master
46
workflows:
LysandreJik's avatar
LysandreJik committed
47
48
49
50
51
52
    version: 2
    build_and_test:
        jobs:
            - build_py3
            - build_py2
            - deploy_doc: *workflow_filters