forked from madeye/shadowsocks-libev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (61 loc) · 1.77 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
sudo: true
language: c
compiler:
- gcc
- clang
env:
global:
- LIBSODIUM_VER=1.0.12
- MBEDTLS_VER=2.4.0
before_install:
- wget https://github.com/jedisct1/libsodium/releases/download/$LIBSODIUM_VER/libsodium-$LIBSODIUM_VER.tar.gz
- tar xvf libsodium-$LIBSODIUM_VER.tar.gz
- pushd libsodium-$LIBSODIUM_VER
- ./configure --prefix=/usr && make
- sudo make install
- popd
- wget https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz
- tar xvf mbedtls-$MBEDTLS_VER-gpl.tgz
- pushd mbedtls-$MBEDTLS_VER
- make SHARED=1
- sudo make install
- popd
# Load cached docker images
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
addons:
apt:
packages:
- autoconf
- autotools-dev
- libudns-dev
- libev-dev
- asciidoc
- xmlto
script:
- ./autogen.sh
- ./configure && make
- cd build && cmake ../ && make
# Test cmake using our builder
# - cd docker/build && docker build -f builder.Dockerfile -t builder . && cd -
# - docker run --rm -it -v $PWD:/src -w /src builder sh -c /src/docker/build/dockerbuild.sh
branches:
only:
- master
notifications:
recipients:
email:
on_success: change
on_failure: always
# Use cache to speedup next build
services:
- docker
before_cache:
# Save tagged docker images
- >
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
cache:
bundler: true
directories:
- $HOME/docker