-
Notifications
You must be signed in to change notification settings - Fork 103
118 lines (100 loc) · 3.74 KB
/
autobuild.yml
File metadata and controls
118 lines (100 loc) · 3.74 KB
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
name: build
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
linux-build:
runs-on: ubuntu-20.04
container: nvidia/cuda:12.2.0-devel-ubuntu20.04
env:
CUDAARCHS: '60'
TRIMESH_VERSION: '2022.03.04'
CMAKE_VERSION: '3.20.4'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install OpenMP and other libraries
run: |
apt update
apt install -y --no-install-recommends apt-utils
apt install -y libgomp1 git mesa-common-dev libglu1-mesa-dev libxi-dev wget ninja-build
- name: Install CMake
run: |
wget -q -O ./cmake-install.sh https://github.com/Kitware/CMake/releases/download/v${{ env.CMAKE_VERSION }}/cmake-${{ env.CMAKE_VERSION }}-Linux-x86_64.sh
chmod u+x ./cmake-install.sh
mkdir "$HOME"/cmake
./cmake-install.sh --skip-license --prefix="$HOME"/cmake
rm ./cmake-install.sh
- name: Build Trimesh2
run: |
git clone --single-branch --depth 1 -b ${{ env.TRIMESH_VERSION }} https://github.com/Forceflow/trimesh2.git ../trimesh2
cd ../trimesh2
make all -j $(nproc)
make clean
- name: Configure cuda_voxelizer
run: |
PATH=$PATH:"$HOME"/cmake/bin
cmake -GNinja \
-DTrimesh2_INCLUDE_DIR="../trimesh2/include" \
-DTrimesh2_LINK_DIR="../trimesh2/lib.Linux64" \
-S . -B ./build
- name: Build cuda_voxelizer
run: |
PATH=$PATH:"$HOME"/cmake/bin
cmake --build ./build --parallel $(nproc)
- name: Test
run: ./build/cuda_voxelizer -f ./test_models/bunny.OBJ -s 64 -cpu
windows-build:
runs-on: windows-2019
env:
CUDA_MAJOR_VERSION: '12.2'
CUDA_PATCH_VERSION: '0'
TRIMESH_VERSION: '2022.03.04'
CUDAARCHS: '60'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache Trimesh2
id: trimesh2-cache
uses: actions/cache@v2
with:
path: ${{ runner.workspace }}\trimesh2-build
key: ${{ runner.os }}-build-trimesh2-cache-1
# Older version then 11.4.0 of CUDA Toolkit does not have thrust option for installation in silent mode
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
method: 'network'
cuda: '${{ env.CUDA_MAJOR_VERSION }}.${{ env.CUDA_PATCH_VERSION }}'
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]'
- name: Build Trimesh2
if: steps.trimesh2-cache.outputs.cache-hit != 'true'
run: |
Install-Module VSSetup -Scope CurrentUser -Force
git clone -b ${{ env.TRIMESH_VERSION }} --single-branch --depth 1 https://github.com/Forceflow/trimesh2.git ..\trimesh2
cd ..\trimesh2
& (Join-Path (Get-VSSetupInstance).InstallationPath -ChildPath MSBuild\Current\Bin\msbuild.exe) .\msvc\vs2019\trimesh2.sln -nologo -m:2 /t:libsrc /p:Configuration=Release /p:Platform=x64
mkdir ..\trimesh2-build
Move-Item .\include ..\trimesh2-build
Move-Item .\lib.Win64.vs142 ..\trimesh2-build
cd -
rm -Recurse -Force ..\trimesh2
- name: Configure cuda_voxelizer
run: |
$trimeshDir = "..\trimesh2-build"
cmake -A x64 `
-DCMAKE_TOOLCHAIN_FILE:FILEPATH="C:\vcpkg\scripts\buildsystems\vcpkg.cmake" `
-DTrimesh2_INCLUDE_DIR:PATH="$trimeshDir\include" `
-DTrimesh2_LINK_DIR:PATH="$trimeshDir\lib.Win64.vs142" `
-DCMAKE_BUILD_TYPE=Release `
-S . -B .\build
- name: Build cuda_voxelizer
run: cmake --build .\build --parallel 2 --target ALL_BUILD --config Release
- name: Test cuda_voxelizer
run: .\build\Release\cuda_voxelizer.exe -f .\test_models\bunny.OBJ -s 64 -cpu