-
Notifications
You must be signed in to change notification settings - Fork 136
95 lines (89 loc) · 2.94 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'README_CN.md'
- 'docs/**'
- 'docs_zh-CN/**'
pull_request:
paths-ignore:
- 'README.md'
- 'README_CN.md'
- 'docs/**'
- 'docs_zh-CN/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_cuda101:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]
torch: [1.9.0]
include:
- torch: 1.9.0
torchvision: 0.10.0
torchaudio: 0.9.0
openpifpaf: 0.13.1
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mmhuman3d_env
python-version: ${{matrix.python-version}}
auto-activate-base: false
- name: Prepare test data
run: |
mkdir mmhuman3d_download
cd mmhuman3d_download
wget -O mmhuman3d.7z -q https://openmmlab-share.oss-cn-hangzhou.aliyuncs.com/mmhuman3d/mmhuman3d.7z
7za x mmhuman3d.7z
ls -l
cd ..
cp -r mmhuman3d_download/mmhuman3d/* ./
rm -rf mmhuman3d_download
- name: Upgrade pip
run: pip install pip --upgrade
- name: Install ffmpeg
run: |
conda install ffmpeg
ffmpeg -version
- name: Install PyTorch
run: |
conda install pytorch==${{matrix.torch}} torchvision==${{matrix.torchvision}} torchaudio==${{matrix.torchaudio}} cudatoolkit=10.2 -c pytorch
- name: Install pytorch3d
run: |
conda install -c fvcore -c iopath -c conda-forge fvcore iopath -y
pip install "git+https://github.com/facebookresearch/pytorch3d.git"
- name: Install MMCV
run: |
pip install "mmcv-full>=1.3.17,<=1.5.3" -f https://download.openmmlab.com/mmcv/dist/cpu/torch${{matrix.torch}}/index.html
python -c 'import mmcv; print(mmcv.__version__)'
- name: Install openpifpaf
run: pip install openpifpaf==${{matrix.openpifpaf}}
- name: Install other dependencies
run: pip install -r requirements.txt
- name: Build and install
run: rm -rf .eggs && pip install -e .
- name: Run unittests and generate coverage report
run: |
coverage run --source mmhuman3d -m pytest tests/
coverage xml
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false