forked from Forceflow/cuda_voxelizer
-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (85 loc) · 3.53 KB
/
autobuild.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
name: build
on:
workflow_dispatch:
inputs:
cuda-version:
description: 'CUDA version for Linux build. For example: 10.1, 10.2. This parameter has no effect for Windows.'
required: true
default: '10.2'
env:
CUDA_ARCH: 30
jobs:
linux-build:
runs-on: ubuntu-18.04
container: nvidia/cuda:${{ github.event.inputs.cuda-version }}-devel-ubuntu18.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: universal-cmake
- name: Install GLM and OpenMP
run: apt update && apt install -y libglm-dev libgomp1
- name: Build Trimesh2
run: |
apt update
apt install -y git mesa-common-dev libglu1-mesa-dev libxi-dev
git clone -b 2020.03.04 https://github.com/Forceflow/trimesh2.git ../trimesh2
cd ../trimesh2 && make all -j 2 && cd -
- name: Install CMake
run: |
apt install -y wget
wget https://github.com/Kitware/CMake/releases/download/v3.13.0/cmake-3.13.0-Linux-x86_64.sh -q -O ./cmake-install.sh
chmod u+x ./cmake-install.sh
mkdir ./cmake
./cmake-install.sh --skip-license --prefix=./cmake
rm ./cmake-install.sh
- name: Build cuda_voxelizer
run: |
mkdir ./build
cd ./build
../cmake/bin/cmake -DTrimesh2_INCLUDE_DIR="../../trimesh2/include" -DTrimesh2_LINK_DIR="../../trimesh2/lib.Linux64" -DCUDA_ARCH=${CUDA_ARCH} ..
../cmake/bin/cmake --build . -j 2
- name: Test
run: ./build/cuda_voxelizer -f ./test_models/bunny.OBJ -s 64 -cpu
windows-build:
runs-on: windows-2019
env:
CUDA_PATH_V10_1: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: universal-cmake
- name: Install CUDA 10.1
run: |
Invoke-WebRequest http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe -OutFile .\cuda.exe
Start-Process -FilePath .\cuda.exe -ArgumentList "-s","nvcc_10.1","cudart_10.1","visual_studio_integration_10.1" -Wait -NoNewWindow
rm .\cuda.exe
- name: Install GLM
run: |
vcpkg.exe install glm:x64-windows
- name: Cache Trimesh2
id: trimesh2-cache
uses: actions/cache@v2
with:
path: ..\trimesh2-build
key: ${{ runner.os }}-build-trimesh2-cache
- name: Build Trimesh2
if: steps.trimesh2-cache.outputs.cache-hit != 'true'
run: |
git clone -b 2020.03.04 https://github.com/Forceflow/trimesh2.git ..\trimesh2
cd ..\trimesh2
& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\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: Build cuda_voxelizer
run: |
$trimeshDir = "..\trimesh2-build"
mkdir .\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" -DCUDA_ARCH:STRING=$env:CUDA_ARCH -DCMAKE_BUILD_TYPE=Release -S . -B .\build
& cmake --build .\build -j 2 --target ALL_BUILD --config Release
- name: Test cuda_voxelizer
run: .\build\Release\cuda_voxelizer.exe -f .\test_models\bunny.OBJ -s 64 -cpu