-
Notifications
You must be signed in to change notification settings - Fork 42
76 lines (71 loc) · 2.23 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
# 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/**'
pull_request:
paths-ignore:
- 'README.md'
- 'README_CN.md'
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_cuda114:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
container:
image: openxrlab/xrmocap_runtime:ubuntu1804_x64_cuda116_py38_torch1121_mmcv161
env:
GITHUB_ACTIONS: true
steps:
- uses: actions/checkout@v2
- name: Show conda env
run: |
source /opt/miniconda/etc/profile.d/conda.sh && conda deactivate
conda info -e
conda activate openxrlab
conda list | grep torch
conda list | grep mmcv
- name: Prepare test data
run: |
sh scripts/download_test_data.sh
- name: Prepare weight
run: |
sh scripts/download_weight.sh
- name: Build and install
run: |
rm -rf xrmocap.egg-info
source /opt/miniconda/etc/profile.d/conda.sh && conda activate openxrlab
pip install xrprimer
pip install .
- name: Install pytest plugin
run: |
source /opt/miniconda/etc/profile.d/conda.sh && conda activate openxrlab
pip install pytest-github-actions-annotate-failures
- name: Run unittests
run: |
source /opt/miniconda/etc/profile.d/conda.sh && conda activate openxrlab
coverage run --source xrmocap -m pytest tests/
- name: Generate coverage report
run: |
source /opt/miniconda/etc/profile.d/conda.sh && conda activate openxrlab
coverage xml
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false