-
Notifications
You must be signed in to change notification settings - Fork 665
206 lines (181 loc) · 5.47 KB
/
fvdb.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: fVDB
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb/**'
- 'openvdb_cmd/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
- 'fvdb/debug/**'
- 'fvdb/docs/**'
- 'fvdb/examples/**'
- 'fvdb/notebooks/**'
- 'fvdb/scripts/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb/**'
- 'openvdb_cmd/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'nanovdb/**'
- 'pendingchanges/**'
- '**.md'
- 'fvdb/debug/**'
- 'fvdb/docs/**'
- 'fvdb/examples/**'
- 'fvdb/notebooks/**'
- 'fvdb/scripts/**'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
permissions:
contents: write
deployments: write
jobs:
fvdb-build:
name: fVDB Build
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-16c-64g-600h') || 'ubuntu-latest' }}
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_build Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_build
environment-file: fvdb/env/build_environment.yml
- name: Buid fvdb
run: |
cd fvdb &&
TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" MAX_JOBS=$(($(nproc) < $(free -g | awk '/^Mem:/{jobs=int($7/2.5); if(jobs<1) jobs=1; print jobs}') ? $(nproc) : $(free -g | awk '/^Mem:/{jobs=int($7/2.5); if(jobs<1) jobs=1; print jobs}'))) python setup.py bdist_wheel --dist-dir=dist &&
tree
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: fvdb-test-package
path: fvdb/dist/*.whl
retention-days: 4
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"
fvdb-unit-test:
needs: [fvdb-build]
name: fVDB Unit Tests
runs-on: ubuntu-20.04-gpu-t4-4c-16g-176h
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_test
environment-file: fvdb/env/test_environment.yml
- name: Download package
uses: actions/download-artifact@v4
with:
name: fvdb-test-package
path: ./dist
- name: Install package
run: |
conda activate fvdb_test
pip install ./dist/*.whl
- name: cd fvdb
run: cd fvdb
- name: Run tests
run: |
cd tests;
pytest -v unit
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"
fvdb-benchmarks:
needs: [fvdb-build]
name: fVDB Continuous Benchmarking
runs-on:
- ubuntu-20.04-gpu-t4-4c-16g-176h
container:
image: aswf/ci-openvdb:2023-clang15.0
options: --rm
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: fvdb_test
environment-file: fvdb/env/test_environment.yml
- name: Download package
uses: actions/download-artifact@v4
with:
name: fvdb-test-package
path: ./dist
- name: Install package
run: |
conda activate fvdb_test
pip install ./dist/*.whl
- name: Disable git ownership verification
run: |
git config --global --add safe.directory "$(pwd)"
- name: cd fvdb
run: cd fvdb
- name: Run benchmarks
run: |
cd tests;
pytest benchmark --benchmark-json benchmark/output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Python Benchmark with pytest-benchmark
tool: 'pytest'
output-file-path: tests/benchmark/output.json
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@swahtz'
- name: Cleanup
if: always()
run: |
echo "Cleaning up /__w/_temp directory"
sudo rm -rf /__w/_temp/*
echo "Cleanup completed"