-
Notifications
You must be signed in to change notification settings - Fork 4
181 lines (175 loc) · 6.07 KB
/
assimp.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
name: Assimp
on: [push, pull_request]
# Cancel in-progress builds on push to same branch / PR
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
ZLIB_VERSION: 1.3.1
ASSIMP_VERSION: 5.3.1
jobs:
windows:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019]
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up Visual Studio environment
uses: seanmiddleditch/gha-setup-vsdevenv@v3
- name: Clone Assimp
uses: actions/checkout@v3
with:
repository: assimp/assimp
ref: v${{ env.ASSIMP_VERSION }}
path: assimp
- name: Download prebuilt zlib
# Built on the `zlib` branch but hosted manually to avoid having to mess
# with access permissions
run: |
Invoke-WebRequest https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip -OutFile zlib.zip
7z x zlib.zip -o${{ github.workspace }}/deps
- name: Build & install Debug
shell: cmd
run: |
mkdir build-debug && cd build-debug
cmake ../assimp ^
-DCMAKE_C_COMPILER=cl.exe ^
-DCMAKE_CXX_COMPILER=cl.exe ^
-DCMAKE_BUILD_TYPE=Debug ^
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF ^
-DASSIMP_BUILD_TESTS=OFF ^
-DASSIMP_BUILD_ZLIB=OFF ^
-DASSIMP_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DZLIB_INCLUDE_DIR=${{ github.workspace }}/deps/include ^
-DZLIB_LIBRARY_REL=${{ github.workspace }}/deps/lib/zlibstatic.lib ^
-DZLIB_LIBRARY_DBG=${{ github.workspace }}/deps/lib/zlibstatic.lib ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install-debug ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-G Ninja
ninja install
- name: Build & install Release
shell: cmd
run: |
mkdir build && cd build
cmake ../assimp ^
-DCMAKE_C_COMPILER=cl.exe ^
-DCMAKE_CXX_COMPILER=cl.exe ^
-DCMAKE_BUILD_TYPE=Release ^
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF ^
-DASSIMP_BUILD_TESTS=OFF ^
-DASSIMP_BUILD_ZLIB=OFF ^
-DASSIMP_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DZLIB_INCLUDE_DIR=${{ github.workspace }}/deps/include ^
-DZLIB_LIBRARY_REL=${{ github.workspace }}/deps/lib/zlibstatic.lib ^
-DZLIB_LIBRARY_DBG=${{ github.workspace }}/deps/lib/zlibstatic.lib ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-G Ninja
ninja install
- name: Upload Debug artifacts
uses: actions/upload-artifact@v1
with:
name: assimp-${{ env.ASSIMP_VERSION }}-${{ matrix.os }}-debug
path: install-debug
- name: Upload Release artifacts
uses: actions/upload-artifact@v1
with:
name: assimp-${{ env.ASSIMP_VERSION }}-${{ matrix.os }}
path: install
windows-mingw:
name: windows-mingw
runs-on: windows-2019
steps:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v3
- name: Set up MinGW environment
uses: msys2/setup-msys2@v2
- name: Clone Assimp
uses: actions/checkout@v2
with:
repository: assimp/assimp
ref: v${{ env.ASSIMP_VERSION }}
path: assimp
- name: Download prebuilt zlib
# Built on the `zlib` branch but hosted manually to avoid having to mess
# with access permissions
run: |
Invoke-WebRequest https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-windows-mingw.zip -OutFile zlib.zip
7z x zlib.zip -o${{ github.workspace }}/deps
- name: Build & install
shell: cmd
run: |
mkdir build && cd build
cmake ../assimp ^
-DCMAKE_C_COMPILER=gcc.exe ^
-DCMAKE_CXX_COMPILER=g++.exe ^
-DCMAKE_BUILD_TYPE=Release ^
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF ^
-DASSIMP_BUILD_TESTS=OFF ^
-DASSIMP_BUILD_ZLIB=OFF ^
-DASSIMP_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DZLIB_INCLUDE_DIR=${{ github.workspace }}/deps/include ^
-DZLIB_LIBRARY_REL=${{ github.workspace }}/deps/lib/libzlibstatic.a ^
-DZLIB_LIBRARY_DBG=${{ github.workspace }}/deps/lib/libzlibstatic.a ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install ^
-DCMAKE_PREFIX_PATH=%CD:\=/%/deps ^
-G Ninja
ninja install
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: assimp-${{ env.ASSIMP_VERSION }}-windows-mingw
path: install
ubuntu:
name: ${{ matrix.os }}
runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }}
strategy:
matrix:
include:
- os: ubuntu-18.04
runs-on: ubuntu-latest
container: ubuntu:bionic-20220427
steps:
- name: Install base build tools
run: |
apt update
apt install -y ninja-build cmake g++ wget
mkdir -p deps
- name: Clone Assimp
uses: actions/checkout@v3
with:
repository: assimp/assimp
ref: v${{ env.ASSIMP_VERSION }}
path: assimp
- name: Fetch prebuilt zlib
run: |
mkdir -p deps && cd deps
wget https://ci.magnum.graphics/zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip
unzip zlib-${{ env.ZLIB_VERSION }}-${{ matrix.os }}.zip
- name: Build & install
run: |
mkdir assimp-build && cd assimp-build
cmake ../assimp \
-DCMAKE_BUILD_TYPE=Release \
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF \
-DASSIMP_BUILD_TESTS=OFF \
-DASSIMP_BUILD_ZLIB=OFF \
-DASSIMP_NO_EXPORT=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_INSTALL_PREFIX=$(pwd)/../install \
-DCMAKE_PREFIX_PATH=$(pwd)/../deps \
-G Ninja
ninja install/strip
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: assimp-${{ env.ASSIMP_VERSION }}-${{ matrix.os }}
path: install