-
-
Notifications
You must be signed in to change notification settings - Fork 17
149 lines (137 loc) · 4.15 KB
/
build-release.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: build release
on:
workflow_dispatch:
inputs:
tag:
description: 'Build tag'
required: true
default: 'pre-release'
jobs:
build-pylib-binaries:
runs-on: windows-2022
defaults:
run:
shell: bash -el {0}
env:
CUDA_SUB_PACKAGES:
CUDA_PATH: "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1"
strategy:
matrix:
# https://en.wikipedia.org/wiki/CUDA#GPUs_supported
artifact: [
{
arch: "61",
name: "Pascal",
gpus: "GTX 1050 - 1080 & Ti, Quadro P400 - P6000"
},
{
arch: "75",
name: "Turing",
gpus: "RTX 2060 - 2080 & Ti, Quadro RTX 4000 - 8000"
},
{
arch: "86",
name: "Ampere",
gpus: "RTX 3050 - 3090 & Ti, RTX A2000 - A6000"
},
{
arch: "89",
name: "Lovelace",
gpus: "RTX 4070 - 4090, RTX 6000 Ada"
}
]
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.sha }}
submodules: recursive
- name: Install CMake
uses: lukka/[email protected]
- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "12.1.0"
method: 'network'
sub-packages: '[
"cublas",
"cublas_dev",
"cudart",
"curand",
"curand_dev",
"nvcc",
"nvrtc",
"nvrtc_dev",
"thrust",
"visual_studio_integration"
]'
- name: Setup Conda
uses: conda-incubator/[email protected]
with:
activate-environment: py310
environment-file: etc/py310.yml
auto-activate-base: false
- name: CMake Configure
env:
CUDA_ARCH_LIST: ${{ matrix.artifact.arch }}
TCNN_CUDA_ARCHITECTURES: ${{ matrix.artifact.arch }}
run: |
cmake . \
-B build \
-G "Visual Studio 17 2022" \
-A x64 \
-DCMAKE_BUILD_TYPE=Release \
-DPYTHON_EXECUTABLE="${CONDA_PREFIX}\\python.exe" \
-DTN_BUILD_PYD=ON \
-DTN_BUILD_EXE=OFF
- name: CMake Build
run: cmake --build build --config Release -j
- name: Archive Build Result
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: build/Release/
path: .
filename: '../archive/PyTurboNeRF-${{ matrix.artifact.name }}.zip'
- name: Generate Release
id: gen-release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: 'build/archive/PyTurboNeRF-${{ matrix.artifact.name }}.zip'
bodyFile: etc/pre-release.md
commit: ${{ github.sha }}
makeLatest: true
name: 'PyTurboNeRF Binaries'
prerelease: true
replacesArtifacts: true
tag: ${{ inputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_url: ${{ steps.gen-release.outputs.html_url }}
notify-discord:
runs-on: ubuntu-20.04
needs: build-pylib-binaries
steps:
- name: Dispatch Release Notification
uses: Ilshidur/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "A new version of the TurboNeRF core binary is now available! [PyTurboNeRF ${{ inputs.tag }}](<${{ needs.build-pylib-binaries.outputs.release_url }}>)"
trigger-blender-addon-release:
runs-on: ubuntu-20.04
needs: build-pylib-binaries
steps:
- name: Trigger TurboNeRF-Blender Release
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.SYNC_PAT }}
repository: 'JamesPerlman/TurboNeRF-Blender'
event-type: 'release'
client-payload: |
{
"tag": "${{ inputs.tag }}",
"release_url": "${{ needs.build-pylib-binaries.outputs.release_url }}"
}