forked from Tencent/ncnn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
146 lines (125 loc) · 6.45 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
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- libprotobuf-dev
- protobuf-compiler
homebrew:
packages:
- protobuf
chocolatey:
packages:
- protoc
matrix:
include:
- name: "linux-gcc"
os: linux
dist: xenial
compiler: gcc
env:
- NAME=linux-gcc
- BUILD="mkdir build && cd build && cmake .. && make -j2"
- name: "linux-gcc-gpu"
os: linux
dist: xenial
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: xenial
compiler: clang
env:
- NAME=linux-clang
- BUILD="mkdir build && cd build && cmake .. && make -j2"
- name: "linux-clang-gpu"
os: linux
dist: xenial
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: xenial
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: xenial
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: xenial
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: xenial
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: "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"
before_install:
- eval "${BEFORE_BUILD}"
script:
- eval "${BUILD}"