-
Notifications
You must be signed in to change notification settings - Fork 664
149 lines (138 loc) · 4.69 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
name: fVDB
on:
push:
branches:
- 'master'
- 'feature/**'
- 'pr/**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
pull_request:
branches:
- '**'
paths-ignore:
- 'CHANGES'
- 'CODEOWNERS'
- 'doc/**'
- 'openvdb_ax/**'
- 'openvdb_maya/**'
- 'openvdb_houdini/**'
- 'pendingchanges/**'
- '**.md'
schedule:
# run this workflow every day 7am UTC
- cron: '0 7 * * *'
workflow_dispatch:
inputs:
type:
description: 'The type of CI to run (all, linux, win, mac)'
required: true
default: 'linux'
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
linux-fvdb-build:
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
name: >
linux-fvdb-build:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
# env:
# CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { cxx: g++, image: '2023-clang15.0', build: 'Release' }
# - { cxx: g++, image: '2022-clang11', build: 'Debug' }
# - { cxx: clang++, image: '2022-clang11', build: 'Release' }
# - { cxx: clang++, image: '2022-clang11', build: 'Debug' }
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "*"
channels: conda-forge
channel-priority: strict
activate-environment: fvdb_build
environment-file: fvdb/env/build_environment.yml
- name: Build fvdb
run: |
cd fvdb
DISTUTILS_DEBUG="1" TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6+PTX" MAX_JOBS=$(($(nproc) < $(free -g | awk '/^Mem:/{jobs=int($4/2.5); if(jobs<1) jobs=1; print jobs}') ? $(nproc) : $(free -g | awk '/^Mem:/{jobs=int($4/2.5); if(jobs<1) jobs=1; print jobs}'))) python setup.py bdist_wheel --dist-dir=dist
shell:
bash -el {0}
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: fvdb-package-${{ matrix.config.cxx }}-${{ matrix.config.build }}
path: dist/
- name: Clean Conda
run: |
conda clean -pty
shell:
bash -el {0}
linux-fvdb-test:
needs: [linux-fvdb-build]
if: |
github.event_name != 'workflow_dispatch' ||
github.event.inputs.type == 'all' ||
github.event.inputs.type == 'linux'
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-gpu-t4-4c-16g-178h') || 'ubuntu-latest' }}
name: >
linux-fvdb-test:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
container:
image: aswf/ci-openvdb:${{ matrix.config.image }}
# env:
# CXX: ${{ matrix.config.cxx }}
strategy:
matrix:
config:
- { cxx: g++, image: '2022-clang11', build: 'Release' }
# - { cxx: g++, image: '2022-clang11', build: 'Debug' }
# - { cxx: clang++, image: '2022-clang11', build: 'Release' }
# - { cxx: clang++, image: '2022-clang11', build: 'Debug' }
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up fvdb_test Conda env
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
mamba-version: "*"
channels: conda-forge
channel-priority: strict
activate-environment: fvdb_test
environment-file: fvdb/env/test_environment.yml
- name: Download package
uses: actions/download-artifact@v4
with:
name: fvdb-package-${{ matrix.config.cxx }}-${{ matrix.config.build }}
- name: Install package
run: |
python -m pip install dist/*.whl
- name: Run tests
run: |
pytest -v fvdb/tests/unit
shell:
bash -el {0}
- name: Clean Conda
run: |
conda clean -pty
shell:
bash -el {0}