-
Notifications
You must be signed in to change notification settings - Fork 27
138 lines (120 loc) · 4.48 KB
/
ci.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
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
include:
- dir: win-libs-vc14-x64
generator: Visual Studio 16 2019
config: Release
os: windows-2019
args: -A x64
archive: thirdparty-win64.zip
- dir: win-libs-vc14
generator: Visual Studio 16 2019
config: Release
os: windows-2019
args: -A Win32
archive: thirdparty-win32.zip
- dir: darwin-libs-a
generator: Unix Makefiles
config: Release
os: macos-latest
args: >-
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
-DBUILD_NVIDIACG=OFF
archive: thirdparty-mac.tar.xz
- dir: android-libs-arm64
generator: Unix Makefiles
config: Release
os: ubuntu-latest
args: >-
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DCMAKE_ANDROID_ARCH=arm64
-DCMAKE_SYSTEM_VERSION=21
-DANDROID_ABI=arm64-v8a
-DANDROID_PLATFORM=android-21
-DBUILD_FCOLLADA=OFF
-DBUILD_VRPN=OFF
-DBUILD_ARTOOLKIT=OFF
archive: thirdparty-android-arm64.tar.xz
- dir: android-libs-arm
generator: Unix Makefiles
config: Release
os: ubuntu-latest
args: >-
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake
-DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a
-DCMAKE_ANDROID_ARCH=arm
-DCMAKE_SYSTEM_VERSION=19
-DANDROID_ABI=armeabi-v7a
-DANDROID_PLATFORM=android-19
-DBUILD_FCOLLADA=OFF
-DBUILD_VRPN=OFF
-DBUILD_ARTOOLKIT=OFF
archive: thirdparty-android-arm.tar.xz
- dir: android-libs-x86_64
generator: Unix Makefiles
config: Release
os: ubuntu-latest
args: >-
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake
-DCMAKE_ANDROID_ARCH_ABI=x86_64
-DCMAKE_ANDROID_ARCH=x86_64
-DCMAKE_SYSTEM_VERSION=21
-DANDROID_ABI=x86_64
-DANDROID_PLATFORM=android-21
-DBUILD_FCOLLADA=OFF
-DBUILD_VRPN=OFF
-DBUILD_ARTOOLKIT=OFF
archive: thirdparty-android-x86_64.tar.xz
- dir: android-libs-x86
generator: Unix Makefiles
config: Release
os: ubuntu-latest
args: >-
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_LATEST_HOME/build/cmake/android.toolchain.cmake
-DCMAKE_ANDROID_ARCH_ABI=x86
-DCMAKE_ANDROID_ARCH=x86
-DCMAKE_SYSTEM_VERSION=19
-DANDROID_ABI=x86
-DANDROID_PLATFORM=android-19
-DBUILD_FCOLLADA=OFF
-DBUILD_VRPN=OFF
-DBUILD_ARTOOLKIT=OFF
archive: thirdparty-android-x86.tar.xz
runs-on: ${{ matrix.os }}
steps:
- name: Clone
uses: actions/checkout@v2
with:
path: thirdparty
- name: Install yasm
if: runner.os == 'macOS' || startsWith(matrix.os, 'ubuntu')
run: ${{runner.os == 'macOS' && 'brew' || 'sudo apt-get'}} install yasm
- name: Configure
working-directory: thirdparty
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.config}} -G "${{matrix.generator}}" ${{matrix.args}}
- name: Build
working-directory: thirdparty
run: cmake --build ${{github.workspace}}/build --config ${{matrix.config}} -j4
- name: Get Python (Windows)
if: github.event_name == 'push' && runner.os == 'Windows'
working-directory: thirdparty
run: .\install-python.ps1 ${{matrix.dir}}
- name: Make ZIP file
if: endsWith(matrix.archive, '.zip')
run: 7z a ${{matrix.archive}} thirdparty/${{matrix.dir}} thirdparty/win-util thirdparty/win-python*/
- name: Make tarball
if: endsWith(matrix.archive, '.tar') || contains(matrix.archive, '.tar.')
run: tar -cJvf ${{matrix.archive}} thirdparty/${{matrix.dir}}
- name: Upload
if: github.event_name == 'push'
uses: actions/upload-artifact@v2
with:
name: ${{matrix.dir}}
path: ${{matrix.archive}}