forked from cxong/cdogs-sdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (69 loc) · 2.05 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
language: c
dist: bionic
osx_image: xcode10.3
compiler:
- gcc
- clang
os:
- linux
- osx
env:
- VERSION=0.7.3
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages:
- rpm
- libsdl2-dev
- libsdl2-image-dev
- libsdl2-mixer-dev
- clang-9
- cmake
- gcc-9
- g++-9
- libgtk-3-dev
- ninja-build
install:
# /usr/bin/gcc points to an older compiler on both Linux and macOS.
- if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi
# /usr/bin/clang points to an older compiler on both Linux and macOS.
#
# Homebrew's llvm package doesn't ship a versioned clang++ binary, so the values
# below don't work on macOS. Fortunately, the path change above makes the
# default values (clang and clang++) resolve to the correct compiler on macOS.
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
if [ "$CXX" = "clang++" ]; then export CXX="clang++-9" CC="clang-9"; fi;
fi
- echo
before_script:
- export CTEST_OUTPUT_ON_FAILURE=1
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh build/macosx/install-sdl2.sh ; fi
# Match install prefix with data dir so that package contains everything required
- cmake -DCMAKE_INSTALL_PREFIX=. -DDATA_INSTALL_DIR=. -Wno-dev .
- make -j2
# Tests are broken on osx. Hope this will be fixed some day
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make test ; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- make package
#debug
- ls $TRAVIS_BUILD_DIR
deploy:
provider: releases
edge: true
api_key:
secure: Rus8lTl0EnVqM6PXwleQ8cffjMTMY1gHGwVdbGsu8cWaDgAWQ86TFgGBbV+x12z9floDPzI7Z1K/entktkiSWQyRPIa9jQfJBIomNABhIykUvpRsL026Cs8TysI4L4hrTvFev10QI28RFyZvUDBT8yytowFsuU5Pfb4n7kDIisQ=
file_glob: true
skip_cleanup: true
file:
- "$TRAVIS_BUILD_DIR/C-Dogs*SDL-*-{Linux,OSX}.{tar.gz,dmg}"
on:
tags: true
condition: $CC = gcc
after_deploy:
- bash build/travis-ci/butler.sh