-
Notifications
You must be signed in to change notification settings - Fork 4
107 lines (103 loc) · 3.23 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
name: Assimp
on: [push, pull_request]
env:
ASSIMP_VERSION: 5.0.1
jobs:
windows:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2016]
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@v2
with:
repository: assimp/assimp
ref: v${{ env.ASSIMP_VERSION }}
path: assimp
- name: Build & install Debug
shell: cmd
# -S and -B is only since CMake 3.13, Windows 2016 uses 3.12 even though
# the README says 3.19.1
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_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install-debug ^
-G Ninja
ninja install
- name: Build & install Release
shell: cmd
# -S and -B is only since CMake 3.13, Windows 2016 uses 3.12 even though
# the README says 3.19.1
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_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install ^
-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: Build & install
shell: cmd
# Build an embedded zlib because otherwise it finds it somewhere on the
# system, which is undesirable
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=ON ^
-DASSIMP_NO_EXPORT=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_INSTALL_PREFIX=%CD:\=/%/../install ^
-G Ninja
ninja install
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
name: assimp-${{ env.ASSIMP_VERSION }}-windows-mingw
path: install