-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (62 loc) · 2.15 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
sudo: required
dist: trusty
language: c
services:
- docker
before_install:
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install -qq -y --no-install-recommends qemu-user-static binfmt-support
- ls /usr/bin/qemu-*-static
- sudo update-binfmts --display qemu-arm
- sudo update-binfmts --display qemu-aarch64
# shutdown services on Travis, which may have a memory impact
# show memory usage before and after shutdown of services
- sudo service --status-all
- sudo free -m -t
- sudo /etc/init.d/postgresql stop
- sudo free -m -t
env:
- ARCH=amd64
- ARCH=i386
- ARCH=armel
- ARCH=rpi
- ARCH=armhf
- ARCH=aarch64
cache:
directories:
- docker-cache
script:
- uname -a
- docker --version
- make -version
# Load image cache (to enable docker build cache - avoid duplicate image generation and upload - especially usefull for daily builds)
- ls -la docker-cache/
- if [ -e docker-cache/$ARCH-cache.tar.gz ]; then
docker load -i docker-cache/$ARCH-cache.tar.gz;
rm docker-cache/$ARCH-cache.tar.gz;
fi
# The build
- make container-$ARCH container-$ARCH-vpnserver container-$ARCH-vpnbridge container-$ARCH-vpnclient
# Generate cache for next time
- docker history -q dquintela/softether-$ARCH:latest > $ARCH-history_cache
- docker history -q dquintela/softether-$ARCH-build:latest >> $ARCH-history_cache
- docker history -q dquintela/softether-vpnserver-$ARCH:latest >> $ARCH-history_cache
- docker history -q dquintela/softether-vpnbridge-$ARCH:latest >> $ARCH-history_cache
- docker history -q dquintela/softether-vpnclient-$ARCH:latest >> $ARCH-history_cache
- cat $ARCH-history_cache | awk '!seen[$0]++' | grep -v "<missing>" | tee $ARCH-history_cache_processed
- docker save $( tac $ARCH-history_cache_processed ) | gzip -1 > docker-cache/$ARCH-cache.tar.gz
- ls -la docker-cache/
after_failure:
# show memory usage again
- sudo free -m -t
# show actions of the OOM killer
- sudo dmesg
deploy:
provider: script
skip_cleanup: true
script: make push-$ARCH push-$ARCH-vpnserver push-$ARCH-vpnbridge push-$ARCH-vpnclient
on:
branch: master
branches:
only:
- master