forked from Tencent/ncnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
184 lines (158 loc) · 9.2 KB
/
.travis.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
sudo: false
language: cpp
addons:
apt:
packages:
- cmake
- libprotobuf-dev
- protobuf-compiler
homebrew:
packages:
- protobuf
chocolatey:
packages:
- protoc
matrix:
include:
- name: "linux-gcc"
os: linux
dist: bionic
compiler: gcc
env:
- NAME=linux-gcc
- BUILD="mkdir build && cd build && cmake .. && make -j2"
- name: "linux-gcc-gpu"
os: linux
dist: bionic
compiler: gcc
env:
- NAME=linux-gcc-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz"
- BUILD="export VULKAN_SDK=`pwd`/1.1.92.1/x86_64 && mkdir build && cd build && cmake -DNCNN_VULKAN=ON .. && make -j2"
- name: "linux-clang"
os: linux
dist: bionic
compiler: clang
env:
- NAME=linux-clang
- BUILD="mkdir build && cd build && cmake .. && make -j2"
- name: "linux-clang-gpu"
os: linux
dist: bionic
compiler: clang
env:
- NAME=linux-clang-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz"
- BUILD="export VULKAN_SDK=`pwd`/1.1.92.1/x86_64 && mkdir build && cd build && cmake -DNCNN_VULKAN=ON .. && make -j2"
- name: "macos-clang"
os: osx
osx_image: xcode9.4
env:
- NAME=macos-clang
- BUILD="mkdir build && cd build && cmake .. && make -j2"
- name: "macos-clang-gpu"
os: osx
osx_image: xcode9.4
env:
- NAME=macos-clang-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/mac/vulkansdk-macos-1.1.92.1.tar.gz?Human=true -O vulkansdk-macos-1.1.92.1.tar.gz && tar -xf vulkansdk-macos-1.1.92.1.tar.gz"
- BUILD="export VULKAN_SDK=`pwd`/vulkansdk-macos-1.1.92.1/macOS && mkdir build && cd build && cmake -DNCNN_VULKAN=ON .. && make -j2"
- name: "windows-vs2017"
os: windows
dist: 1803-containers
env:
- NAME=windows-vs2017
- BUILD="mkdir build && cd build && cmake .. && cmake --build ."
- name: "windows-vs2017-gpu"
os: windows
dist: 1803-containers
env:
- NAME=windows-vs2017-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/windows/VulkanSDK-1.1.92.1-Installer.exe?Human=true -O VulkanSDK-1.1.92.1-Installer.exe && 7z x ./VulkanSDK-1.1.92.1-Installer.exe -oVulkanSDK"
- BUILD="export VULKAN_SDK=`pwd`/VulkanSDK && mkdir build && cd build && cmake -DNCNN_VULKAN=ON .. && cmake --build ."
- name: "android-armv7"
os: linux
dist: bionic
env:
- NAME=android-armv7
- BEFORE_BUILD="wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"armeabi-v7a\" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 .. && make -j2"
- name: "android-armv7-gpu"
os: linux
dist: bionic
env:
- NAME=android-armv7-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz && wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="export PATH=`pwd`/1.1.92.1/x86_64/bin:$PATH && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"armeabi-v7a\" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DNCNN_VULKAN=ON .. && make -j2"
- name: "android-aarch64"
os: linux
dist: bionic
env:
- NAME=android-aarch64
- BEFORE_BUILD="wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"arm64-v8a\" -DANDROID_PLATFORM=android-21 .. && make -j2"
- name: "android-aarch64-gpu"
os: linux
dist: bionic
env:
- NAME=android-aarch64-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz && wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="export PATH=`pwd`/1.1.92.1/x86_64/bin:$PATH && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"arm64-v8a\" -DANDROID_PLATFORM=android-24 -DNCNN_VULKAN=ON .. && make -j2"
- name: "android-x86"
os: linux
dist: bionic
env:
- NAME=android-x86
- BEFORE_BUILD="wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"x86\" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-14 .. && make -j2"
- name: "android-x86-gpu"
os: linux
dist: bionic
env:
- NAME=android-x86-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz && wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="export PATH=`pwd`/1.1.92.1/x86_64/bin:$PATH && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"x86\" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-24 -DNCNN_VULKAN=ON .. && make -j2"
- name: "android-x86_64"
os: linux
dist: bionic
env:
- NAME=android-x86_64
- BEFORE_BUILD="wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"x86_64\" -DANDROID_PLATFORM=android-21 .. && make -j2"
- name: "android-x86_64-gpu"
os: linux
dist: bionic
env:
- NAME=android-x86_64-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/linux/vulkansdk-linux-x86_64-1.1.92.1.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.1.92.1.tar.gz && tar -xf vulkansdk-linux-x86_64-1.1.92.1.tar.gz && wget https://dl.google.com/android/repository/android-ndk-r19c-linux-x86_64.zip && unzip -q android-ndk-r19c-linux-x86_64.zip"
- BUILD="export PATH=`pwd`/1.1.92.1/x86_64/bin:$PATH && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/android-ndk-r19c/build/cmake/android.toolchain.cmake -DANDROID_ABI=\"x86_64\" -DANDROID_PLATFORM=android-24 -DNCNN_VULKAN=ON .. && make -j2"
- name: "ios-iphoneos"
os: osx
osx_image: xcode9.4
env:
- NAME=ios-iphoneos
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DIOS_PLATFORM=OS .. && make -j2"
- name: "ios-iphoneos-gpu"
os: osx
osx_image: xcode9.4
env:
- NAME=ios-iphoneos-gpu
- BEFORE_BUILD="wget https://sdk.lunarg.com/sdk/download/1.1.92.1/mac/vulkansdk-macos-1.1.92.1.tar.gz?Human=true -O vulkansdk-macos-1.1.92.1.tar.gz && tar -xf vulkansdk-macos-1.1.92.1.tar.gz"
- BUILD="export VULKAN_SDK=`pwd`/vulkansdk-macos-1.1.92.1/macOS && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -DVulkan_INCLUDE_DIR=`pwd`/vulkansdk-macos-1.1.92.1/MoltenVK/include -DVulkan_LIBRARY=`pwd`/vulkansdk-macos-1.1.92.1/MoltenVK/iOS/dynamic/libMoltenVK.dylib -DNCNN_VULKAN=ON .. && make -j2"
- name: "ios-iphonesimulator"
os: osx
osx_image: xcode9.4
env:
- NAME=ios-iphonesimulator
- BUILD="mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR .. && make -j2"
- name: "webassembly"
os: linux
dist: bionic
env:
- NAME=webassembly
- BEFORE_BUILD="git clone https://github.com/emscripten-core/emsdk.git && pushd emsdk && ./emsdk install latest && ./emsdk activate latest && popd"
- BUILD="source emsdk/emsdk_env.sh && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake .. && make -j2"
before_install:
- eval "${BEFORE_BUILD}"
script:
- eval "${BUILD}"