forked from Kansattica/msync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (79 loc) · 2.8 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
language: cpp
git:
depth: 5
submodules: false
matrix:
include:
- os: linux
dist: bionic
compiler: gcc
env: BUILD_ARCH=x64 CC=gcc-8 CXX=g++-8
addons:
apt: g++-8 libstdc++-8-dev
- os: linux
dist: bionic
compiler: clang
env: BUILD_ARCH=x64 CC="/usr/bin/clang-7" CXX="/usr/bin/clang++-7"
addons:
apt: clang-7 llvm-7-dev libstdc++-8-dev
- os: osx
osx_image: xcode11
compiler: clang
- os: linux
dist: bionic
compiler: gcc
env: CXXFLAGS="-m32" CFLAGS="-m32" BUILD_ARCH=i386 CC=gcc-8 CXX=g++-8
addons:
apt:
- g++-8
- gcc-8-multilib
- g++-8-multilib
- libstdc++-8-dev-i386-cross
- libcurl4-openssl-dev:i386
- linux-libc-dev:i386
- libstdc++-8-dev
- os: windows
compiler: cl64.exe
env: CMAKE_GENERATOR="Visual Studio 15 2017" CMAKE_GENERATOR_PLATFORM=x64
- os: windows
compiler: cl32.exe
env: CMAKE_GENERATOR="Visual Studio 15 2017" CMAKE_GENERATOR_PLATFORM=win32
script:
- export BUILDTYPE=Release
- mkdir -p build
- cd build
- cmake --version
- cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE ..
- cmake --build . --config $BUILDTYPE --parallel 2
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then EXELOCATION="./$BUILDTYPE/msync.exe"; else EXELOCATION="./msync"; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then TESTLOCATION="./tests/$BUILDTYPE/tests.exe"; else TESTLOCATION="./tests/tests"; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then NETTESTLOCATION="./tests/$BUILDTYPE/net_tests.exe"; else NETTESTLOCATION="./tests/net_tests"; fi
- $EXELOCATION version
- $EXELOCATION yeehaw
- $NETTESTLOCATION
- $TESTLOCATION ~[long_run]
# This one is usually fine, but the osx build will randomly time out on this one.
- travis_wait $TESTLOCATION [long_run_outgoingpost]
# Basically, Travis will time out if it doesn't get any output for over ten minutes.
# Usually, this is fine, but it causes problems because OSX produces binaries that
# run much slower for some reason.
- travis_wait $TESTLOCATION [long_run_parseopts]
after_success:
- echo "Binary size:"
- du -h $EXELOCATION
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then FINISHED_BINARY_NAME="msync-$TRAVIS_TAG-linux-$BUILD_ARCH-$TRAVIS_COMPILER"; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then FINISHED_BINARY_NAME="msync-$TRAVIS_TAG-windows-$CMAKE_GENERATOR_PLATFORM.exe"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then FINISHED_BINARY_NAME="msync-$TRAVIS_TAG-osx-x64"; fi
- echo $FINISHED_BINARY_NAME
- mv $EXELOCATION $FINISHED_BINARY_NAME
before_deploy:
- git tag -l --format='%(contents)' $TRAVIS_TAG > msync_release_notes
deploy:
provider: releases
edge: true
file: $FINISHED_BINARY_NAME
api_key: $API_KEY
name: msync release $TRAVIS_TAG
release_notes_file: msync_release_notes
on:
tags: true