-
Notifications
You must be signed in to change notification settings - Fork 29
163 lines (143 loc) · 4.31 KB
/
continuous.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
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
jobs:
####################
# Linux / macOS
####################
Unix:
name: ${{ matrix.name }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest]
config: [Debug, Release]
include:
- os: macos-latest
name: macOS
- os: ubuntu-18.04
name: Linux
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install \
libblas-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-thread-dev \
libglu1-mesa-dev \
libsuitesparse-dev \
xorg-dev \
ccache
- name: Dependencies (macOS)
if: runner.os == 'macOS'
run: brew install ccache gmp
- name: Cache Build
id: cache-build
uses: actions/cache@v1
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.config }}-cache
- name: Prepare ccache
run: |
ccache --max-size=1.0G
ccache -V && ccache --show-stats && ccache --zero-stats
- name: Configure
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
- name: Build
run: cd build; make -j2; ccache --show-stats
- name: Run Example
run: |
git clone https://github.com/wildmeshing/data.git
cd build
ls ..
./TriWild --input ../data/rocket.obj
./TriWild --input ../data/rocket.obj --feature-input ../data/rocket.json
####################
# Windows
####################
Windows:
name: Windows (${{ matrix.config }})
runs-on: windows-2019
env:
CC: cl.exe
CXX: cl.exe
SCCACHE_IDLE_TIMEOUT: "12000"
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
steps:
- name: Stetup Conda
uses: s-weigand/setup-conda@v1
with:
conda-channels: anaconda, conda-forge
python-version: 3.6
- name: Install Dependencies
shell: powershell
run: |
conda install -c conda-forge mpir -y
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- uses: seanmiddleditch/gha-setup-ninja@master
# https://github.com/actions/cache/issues/101
- name: Set env
run: |
echo "::set-env name=appdata::$($env:LOCALAPPDATA)"
echo "::set-env name=GMP_INC::C:\Miniconda\Library\include"
- name: Set GMP env
run: echo "::set-env name=GMP_LIB::C:\Miniconda\Library\lib"
- name: Cache build
id: cache-build
uses: actions/cache@v1
with:
path: ${{ env.appdata }}\Mozilla\sccache
key: ${{ runner.os }}-${{ matrix.config }}-cache
- name: Prepare sccache
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop install sccache --global
# Scoop modifies the PATH so we make the modified PATH global.
echo "::set-env name=PATH::$env:PATH"
- name: Configure and build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake --version
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-B build ^
-S .
cd build
ninja -j1
- name: Run Example
shell: powershell
run: |
git clone https://github.com/wildmeshing/data.git
cd build
cp C:\Miniconda\Library\bin\mpir.dll .\
cp C:\Miniconda\Library\bin\gmp.dll .\
.\TriWild.exe --input ..\data\rocket\obj
.\TriWild.exe --input ..\data\rocket.obj --feature-input ..\data\rocket.json