1
1
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
2
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
-
3
+
4
4
name : build
5
5
6
6
on :
7
- push :
7
+ push :
8
8
branches :
9
9
- main
10
10
paths-ignore :
11
11
- ' README.md'
12
12
- ' README_CN.md'
13
13
- ' docs/**'
14
-
14
+
15
15
pull_request :
16
16
paths-ignore :
17
17
- ' README.md'
18
18
- ' README_CN.md'
19
19
- ' docs/**'
20
-
20
+
21
21
concurrency :
22
22
group : ${{ github.workflow }}-${{ github.ref }}
23
23
cancel-in-progress : true
24
-
24
+
25
25
jobs :
26
- build_cuda101 :
26
+ build_test :
27
27
runs-on : ubuntu-18.04
28
- strategy :
29
- matrix :
30
- python-version : [3.7]
31
- torch : [1.7.0, 1.8.0]
32
- include :
33
- - torch : 1.7.0
34
- torchvision : 0.8.1
35
- - torch : 1.8.0
36
- torchvision : 0.9.0
37
- defaults :
38
- run :
39
- shell : bash -l {0}
40
-
41
28
steps :
42
29
- uses : actions/checkout@v2
43
- - uses : conda-incubator/setup-miniconda@v2
30
+ - name : Set up Python 3.8
31
+ uses : actions/setup-python@v2
44
32
with :
45
- activate-environment : PROJ_NAME_LOWER_env
46
- python-version : ${{matrix.python-version}}
47
- auto-activate-base : false
48
- - name : Prepare test data
33
+ python-version : 3.8
34
+ - name : Install Env
49
35
run : |
50
- # TODO: prepare test data or remove this step
51
- - name : Upgrade pip
52
- run : pip install pip --upgrade
53
- - name : Install ffmpeg
54
- run : |
55
- conda install ffmpeg
56
- ffmpeg -version
57
- - name : Install PyTorch
58
- run : |
59
- conda install pytorch==${{matrix.torch}} torchvision==${{matrix.torchvision}} cudatoolkit=10.1 -c pytorch
60
- - name : Install MMCV
61
- run : |
62
- pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
63
- python -c 'import mmcv; print(mmcv.__version__)'
64
- - name : Install other dependencies
65
- run : pip install -r requirements.txt
66
- - name : Build and install
67
- run : rm -rf .eggs && pip install -e .
68
- - name : Run unittests and generate coverage report
69
- run : |
70
- coverage run --source PROJ_NAME_LOWER -m pytest tests/
71
- coverage xml
72
- coverage report -m
73
- - name : Upload coverage to Codecov
36
+ pip install coverage pytest
37
+ pip install torch==1.7.1
38
+ # pip install lpips trimesh smplx -i https://pypi.tuna.tsinghua.edu.cn/simple
39
+ # pip install torch numpy mmcv -i https://pypi.tuna.tsinghua.edu.cn/simple
40
+ # pip install opencv-python>=3 yapf imageio scikit-image -i https://pypi.tuna.tsinghua.edu.cn/simple
41
+
42
+ # coverage run --source xrmogen/models -m pytest -s test/models
43
+ # coverage xml
44
+ # coverage report -m
45
+ - name : Upload coverage to Codecov
74
46
uses : codecov/codecov-action@v2
75
47
with :
76
48
files : ./coverage.xml
77
49
flags : unittests
78
50
env_vars : OS,PYTHON
79
51
name : codecov-umbrella
80
- fail_ci_if_error : false
52
+ fail_ci_if_error : false
0 commit comments