forked from cloudflare/quiche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
203 lines (200 loc) · 8.29 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
env:
global:
- secure: "Aa+7RLfRyfdH2ENH0fyjI7Waq7/9XSk1LP6sDwG0zG1uhmus/z0QaiaCd027mFY3V25Kzfd6TVzL92dp3U63+3Qn3hHle3oNdu1jqaSBHB1L7R+IS6tLW0Bny5Zd7mMRNbVO642qvmuZo8A5nuu/WHp3w91WI4rp1rhULm/uhQ/+7Sx7mDSR1vRJyIeB7mETzRpckz0cUiZU656AB1hRsMVzkm+no9urHcnEP6AcPukVlWGgsdcBloMoczwp8M/cnvrGg8SuroEnu82i3eY5TwmXBhtmFa06WUaiIafT8PcB+JVADwunS1nJ7tTGCjInVQY5qNogPJxdr97E9vuHJGMDpdCkDuvTFaF2FdnXuvli3nUr2w7mP3t991ocWQW9PMRUTJe+/pFJ935puy8zD797UKUR3d2GwZRHIpwbzmcP+QQ1wG3odoFk4i/tEUAHtKirh6VglQyp9BFIaIX7TuuqIyRqxcqHVsVfDVVouHBIYuy7uRDd7YjmoF3IqqIKsHEFBnMT9GSQeifjJAPYEOoPXfzoa1Ya8PbmSdYtVR9nyjIHHLv/xDYxG3ulBgmz1ieGe9pGNgqLmi6GSiyJ/Vj+5L+1bJGrVMDELHQR/bVdZMmoAp6y8f397hace2qHKDBVN4AVfDWeCiTs1NUtgrJVIpj3Xt788RrnIfvuhF4="
- secure: "CE2MWJZ+EtmaOheaGBd5XNgV7A/AGLpQ1Lct2R4v8BG3pXFFAM9uJEvpyTXBFx40gzD8HTBHbNRw1Ae+hP/Hz3M8o96jrdVsPlojKaShaOqoalYCghnfxDSd6WsstJdTYUk1iKhU3bSin/PHhDHe5i/dpwTay4DqSCX4MWaJPpItRIwiPpd8ekVGrHb/DkuTpEWY35Dg+9oao9KnB5c/D1oHLvInRMCivtpPpKRxNWkznOGprQALGIPmnHupBQ0zu6H7+K7TE/DT/HmocQd1h6HEba6DGkKqXU79NgS3uz2EFfgdhnIvTlxWTZFtkET9lym5mqjyuvwkIDsEDfGmk7dGjT0MFe2/9RRMxeNjINA1dlat4riUZ+a5dWqj/7uSvcOgTv0lqT5qitHbtqI0Id/TMaZlVE9r1x+vSTy/7ISzwhVPOwFa6SZJFwrHVBqnPZKP8gajpCcDJMKdFjfuLNZMF/NlDhj78S9Hyr0CUUoCKcPYiCxyCPfV7LzNMtlaynKJG2A+z0vLqZ8YSlTrqBfjuVzrq8EDJyJWMRuik3rkNe/GOFzUgQ+nBxgOzPT0Y5CPlEQNYW991pRz2r5gXhR+MSpjF3ytSrMCYYfIwymwqxb9oX4EvPCHCrWCqT4lebQyfPO8Pp8tDeV3XeRBM5a6KjOD0WfZ5pRlZ/REWrM="
addons:
apt:
packages: &linux_deps
- libev-dev
- uthash-dev
- protobuf-compiler
matrix:
include:
- name: "stable Linux x86_64/x86"
language: rust
rust: stable
env:
DEPLOY_BUILD=yes
TARGET_32=i686-unknown-linux-gnu
addons:
apt:
packages:
- [*linux_deps, gcc-multilib, g++-multilib]
before_install:
# Install and use the current stable release of Go
- gimme --list
- eval "$(gimme stable)"
- gimme --list
install:
- rustup component add clippy
- rustup target add $TARGET_32
script:
- RUSTFLAGS="-D warnings" cargo test --verbose
- RUSTFLAGS="-D warnings" cargo package --verbose --allow-dirty
- cargo clippy --examples -- -D warnings
- cargo doc --no-deps
- make -C examples
# http3_test
- RUSTFLAGS="-D warnings" cargo test --no-run --verbose --manifest-path tools/http3_test/Cargo.toml
- cargo clippy --manifest-path tools/http3_test/Cargo.toml -- -D warnings
# qlog
- RUSTFLAGS="-D warnings" cargo test --verbose --manifest-path tools/qlog/Cargo.toml
- cargo clippy --manifest-path tools/qlog/Cargo.toml -- -D warnings
# quiche-apps
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/apps/Cargo.toml
- cargo clippy --manifest-path tools/apps/Cargo.toml -- -D warnings
# x86 cross build
- RUSTFLAGS="-D warnings" cargo build --target=$TARGET_32
- name: "nightly Linux x86_64"
language: rust
rust: nightly
addons:
apt:
packages:
- [*linux_deps]
before_install:
# Install and use the current stable release of Go
- gimme --list
- eval "$(gimme stable)"
- gimme --list
install:
- rustup component add rustfmt
- cargo install cargo-fuzz
script:
- RUSTFLAGS="-D warnings" cargo test --verbose
- RUSTFLAGS="-D warnings" cargo package --verbose --allow-dirty
- cargo fmt -- --check
- cargo doc --no-deps
- make -C examples
# fuzzers
- RUSTFLAGS="-D warnings" cargo fuzz run packet_recv_client -- -runs=1
- RUSTFLAGS="-D warnings" cargo fuzz run packet_recv_server -- -runs=1
- RUSTFLAGS="-D warnings" cargo fuzz run qpack_decode -- -runs=1
- cargo fmt --manifest-path fuzz/Cargo.toml -- --check
# http3_test
- RUSTFLAGS="-D warnings" cargo test --no-run --verbose --manifest-path tools/http3_test/Cargo.toml
- cargo fmt --manifest-path tools/http3_test/Cargo.toml -- --check
# qlog
- RUSTFLAGS="-D warnings" cargo test --verbose --manifest-path tools/qlog/Cargo.toml
- cargo fmt --manifest-path tools/qlog/Cargo.toml -- --check
# quiche-apps
- RUSTFLAGS="-D warnings" cargo build --verbose --manifest-path tools/apps/Cargo.toml
- cargo fmt --manifest-path tools/apps/Cargo.toml -- --check
- name: "stable macOS + iOS"
language: rust
rust: stable
os: osx
osx_image: xcode11.2
install:
- rustup target add aarch64-apple-ios x86_64-apple-ios
script:
# macOS
- RUSTFLAGS="-D warnings" cargo build --verbose
- RUSTFLAGS="-D warnings" cargo test --verbose
# iOS
- cargo install --force cargo-lipo
- RUSTFLAGS="-D warnings" cargo lipo --verbose
- name: "stable Windows x86_64/x86"
language: rust
rust: stable
os: windows
env:
TARGET_64=x86_64-pc-windows-msvc
TARGET_32=i686-pc-windows-msvc
before_install:
- choco install golang nasm
# Update $PATH
- export PATH="$(powershell -Command '("Process", "Machine" | % { [Environment]::GetEnvironmentVariable("PATH", $_) -Split ";" -Replace "\\$", "" } | Select -Unique | % { cygpath $_ }) -Join ":"')"
install:
- rustup target add $TARGET_32 $TARGET_64
script:
- RUSTFLAGS="-D warnings" cargo build --verbose --target=$TARGET_64
- RUSTFLAGS="-D warnings" cargo test --verbose --target=$TARGET_64
- RUSTFLAGS="-D warnings" cargo build --verbose --target=$TARGET_32
- RUSTFLAGS="-D warnings" cargo test --verbose --target=$TARGET_32
- name: "stable Android"
language: android
dist: trusty
env:
NDK_VER_OLD=r13b
NDK_VER=r21
CMAKE_VER=3.6.4111459
android:
components:
- build-tools-26.0.1
# Minimum API level supported
- android-21
install:
# Install rust manually
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable
- export PATH=$HOME/.cargo/bin:$PATH
- rustup default stable
- rustup target add aarch64-linux-android arm-linux-androideabi armv7-linux-androideabi i686-linux-android
# Additional Android components
- echo y | sdkmanager "cmake;$CMAKE_VER"
- export PATH=$ANDROID_HOME/cmake/$CMAKE_VER/bin/:$PATH
script:
#
# Old NDK. Here we use 13b
#
- NDK_URL=https://dl.google.com/android/repository/android-ndk-%s-linux-x86_64.zip
- curl -ondk.zip -q $(printf $NDK_URL $NDK_VER_OLD)
- unzip -q ndk.zip -d $HOME
- export ANDROID_NDK_HOME=$HOME/android-ndk-$NDK_VER_OLD
# Setup android toolchain
- export TOOLCHAIN_DIR=$(pwd)/toolchain
- mkdir -p $TOOLCHAIN_DIR
- tools/setup_android.sh
- tools/build_android.sh --verbose --features ndk-old-gcc
- rm -fr $TOOLCHAIN_DIR && rm -f .cargo/config
#
# NDK 19 or higher. Here we use 21 (long term support)
#
- curl -ondk.zip -q $(printf $NDK_URL $NDK_VER)
- unzip -q ndk.zip -d $HOME
- export ANDROID_NDK_HOME=$HOME/android-ndk-$NDK_VER
- cargo install cargo-ndk
- cargo clean
- tools/build_android_ndk19.sh --verbose
- name: "NGINX"
language: rust
rust: stable
env:
NGINX_VER=1.16.1
addons:
apt:
packages:
- [*linux_deps]
before_install:
# Install and use the current stable release of Go
- gimme --list
- eval "$(gimme stable)"
- gimme --list
script:
- curl -O https://nginx.org/download/nginx-$NGINX_VER.tar.gz
- tar xzf nginx-$NGINX_VER.tar.gz
- |
cd nginx-$NGINX_VER &&
patch -p01 < ../extras/nginx/nginx-1.16.patch &&
./configure --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-openssl="../deps/boringssl" --with-quiche=".." --with-debug &&
make -j`nproc`
- objs/nginx -V
deploy:
# publish docs
- provider: pages
fqdn: docs.quic.tech
local-dir: target/doc
skip-cleanup: true
github-token: $GITHUB_TOKEN
on:
branch: master
condition: $DEPLOY_BUILD = yes
# publish Docker images
- provider: script
skip-cleanup: true
script: >-
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
make -C extras/docker all publish
on:
branch: master
condition: $DEPLOY_BUILD = yes