-
Notifications
You must be signed in to change notification settings - Fork 0
241 lines (212 loc) · 8.9 KB
/
build.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
name: CI
on:
push:
branches:
- '**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build-windows:
runs-on: windows-2022
defaults:
run:
shell: bash
steps:
- name: Download Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.15.2
arch: win64_mingw81
dir: output/windows-mingw_64
- name: Download Boost
run: |
curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz | tar -xz
cd boost_1_79_0
./bootstrap.sh --prefix=../output/windows-mingw_64/boost-1.79.0
./b2 --with-headers --prefix=../output/windows-mingw_64/boost-1.79.0 install
- name: Download Eigen
run: |
curl -L https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz | tar -xz
mkdir eigen-build
cmake -S eigen-3.4.0 -B eigen-build -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=output/windows-mingw_64/eigen-3.4.0 -DCMAKE_BUILD_TYPE=Release
cmake --build eigen-build --target install
- name: Download Nlohmann-Json
run: |
curl -L https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz | tar -xz
mkdir json-build
cmake -S json-3.10.5 -B json-build -G "MinGW Makefiles" -DJSON_BuildTests=OFF -DCMAKE_INSTALL_PREFIX=output/windows-mingw_64/json-3.10.5 -DCMAKE_BUILD_TYPE=Release
cmake --build json-build --target install
- name: Download Catch
run: |
curl -L https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.9.tar.gz | tar -xz
mkdir catch-build
cmake -S Catch2-2.13.9 -B catch-build -G "MinGW Makefiles" -DCATCH_BUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=output/windows-mingw_64/catch-2.13.9 -DCMAKE_BUILD_TYPE=Release
cmake --build catch-build --target install
- name: Write CMake file
uses: frdrwrt/write-to-file@v1.3
with:
filepath: output/windows-mingw_64/paths.cmake
mode: 0666
content: |
set(
CMAKE_PREFIX_PATH
${CMAKE_CURRENT_LIST_DIR}/Qt/5.15.2/mingw81_64/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/boost-1.79.0/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/catch-2.13.9/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/eigen-3.4.0/share/eigen3/cmake
${CMAKE_CURRENT_LIST_DIR}/json-3.10.5/lib/cmake
)
- uses: papeloto/action-zip@v1
with:
files: output
dest: windows-mingw_64.zip
- uses: actions/upload-artifact@v2
with:
name: windows-artifact
path: windows-mingw_64.zip
build-linux:
runs-on: ubuntu-18.04
steps:
- name: Download Boost
run: |
curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz | tar -xz
cd boost_1_79_0
./bootstrap.sh --prefix=../output/linux-gcc_64/boost-1.79.0
./b2 --with-headers --prefix=../output/linux-gcc_64/boost-1.79.0 install
- name: Download Eigen
run: |
curl -L https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz | tar -xz
mkdir eigen-build
cmake -S eigen-3.4.0 -B eigen-build -DCMAKE_INSTALL_PREFIX=output/linux-gcc_64/eigen-3.4.0 -DCMAKE_BUILD_TYPE=Release
cmake --build eigen-build --target install
- name: Download Nlohmann-Json
run: |
curl -L https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz | tar -xz
mkdir json-build
cmake -S json-3.10.5 -B json-build -DJSON_BuildTests=OFF -DCMAKE_INSTALL_PREFIX=output/linux-gcc_64/json-3.10.5 -DCMAKE_BUILD_TYPE=Release
cmake --build json-build --target install
- name: Download Catch
run: |
curl -L https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.9.tar.gz | tar -xz
mkdir catch-build
cmake -S Catch2-2.13.9 -B catch-build -DCATCH_BUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=output/linux-gcc_64/catch-2.13.9 -DCMAKE_BUILD_TYPE=Release
cmake --build catch-build --target install
- name: Write CMake file
uses: frdrwrt/write-to-file@v1.3
with:
filepath: output/linux-gcc_64/paths.cmake
mode: 0666
content: |
set(
CMAKE_PREFIX_PATH
${CMAKE_CURRENT_LIST_DIR}/boost-1.79.0/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/catch-2.13.9/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/eigen-3.4.0/share/eigen3/cmake
${CMAKE_CURRENT_LIST_DIR}/json-3.10.5/lib/cmake
)
- uses: papeloto/action-zip@v1
with:
files: output
dest: linux-gcc_64.zip
- uses: actions/upload-artifact@v2
with:
name: linux-artifact
path: linux-gcc_64.zip
build-macos:
runs-on: macos-10.15
steps:
- name: Download Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.15.2
dir: output/macos-clang_64
- name: Download Boost
run: |
curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz | tar -xz
cd boost_1_79_0
./bootstrap.sh --prefix=../output/macos-clang_64/boost-1.79.0
./b2 --with-headers --prefix=../output/macos-clang_64/boost-1.79.0 install
- name: Download Eigen
run: |
curl -L https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz | tar -xz
mkdir eigen-build
cmake -S eigen-3.4.0 -B eigen-build -DCMAKE_INSTALL_PREFIX=output/macos-clang_64/eigen-3.4.0 -DCMAKE_BUILD_TYPE=Release
cmake --build eigen-build --target install
- name: Download Nlohmann-Json
run: |
curl -L https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.tar.gz | tar -xz
mkdir json-build
cmake -S json-3.10.5 -B json-build -DJSON_BuildTests=OFF -DCMAKE_INSTALL_PREFIX=output/macos-clang_64/json-3.10.5 -DCMAKE_BUILD_TYPE=Release
cmake --build json-build --target install
- name: Download Catch
run: |
curl -L https://github.com/catchorg/Catch2/archive/refs/tags/v2.13.9.tar.gz | tar -xz
mkdir catch-build
cmake -S Catch2-2.13.9 -B catch-build -DCATCH_BUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=output/macos-clang_64/catch-2.13.9 -DCMAKE_BUILD_TYPE=Release
cmake --build catch-build --target install
- name: Write CMake file
uses: frdrwrt/write-to-file@v1.3
with:
filepath: output/macos-clang_64/paths.cmake
mode: 0666
content: |
set(
CMAKE_PREFIX_PATH
${CMAKE_CURRENT_LIST_DIR}/Qt/5.15.2/clang_64/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/boost-1.79.0/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/catch-2.13.9/lib/cmake
${CMAKE_CURRENT_LIST_DIR}/eigen-3.4.0/share/eigen3/cmake
${CMAKE_CURRENT_LIST_DIR}/json-3.10.5/lib/cmake
)
- uses: papeloto/action-zip@v1
with:
files: output
dest: macos-clang_64.zip
- uses: actions/upload-artifact@v2
with:
name: macos-artifact
path: macos-clang_64.zip
develop-release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-18.04
needs: [build-windows, build-linux, build-macos]
steps:
- uses: actions/download-artifact@v2
with:
name: windows-artifact
- uses: actions/download-artifact@v2
with:
name: linux-artifact
- uses: actions/download-artifact@v2
with:
name: macos-artifact
- name: Create release
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Development Build
files: |
*.zip
tagged-release:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-18.04
needs: [build-windows, build-linux, build-macos]
steps:
- uses: actions/download-artifact@v2
with:
name: windows-artifact
- uses: actions/download-artifact@v2
with:
name: linux-artifact
- uses: actions/download-artifact@v2
with:
name: macos-artifact
- name: Create release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
draft: true
files: |
*.zip