forked from freeserf/freeserf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
89 lines (80 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
86
87
88
89
language: cpp
matrix:
include:
- os: linux
compiler: gcc
dist: trusty
- os: osx
compiler: clang
cache:
directories:
- $HOME/3rd_party
install:
- export BUILD_DIR="$HOME/target"
- mkdir $BUILD_DIR
- export SDL_VERSION="2.0.8"
- export SDL2DIR="$HOME/3rd_party/${TRAVIS_OS_NAME}/SDL_${SDL_VERSION}"
- export PKG_CONFIG_PATH="$SDL2DIR/lib/pkgconfig:$PKG_CONFIG_PATH"
- export PATH="$SDL2DIR/bin:$PATH"
- |
cd $BUID_DIR
if [ ! -d "$SDL2DIR" ]; then
mkdir -p "$SDL2DIR" && \
wget https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz -O - | tar -xz && \
(cd SDL2-${SDL_VERSION} && \
./configure --prefix=$SDL2DIR && \
make -j5 && make install)
fi
- export SDL_MIXER_VERSION="2.0.2"
- export SDL2MIXERDIR="$HOME/3rd_party/${TRAVIS_OS_NAME}/SDL_mixer_${SDL_MIXER_VERSION}"
- export PKG_CONFIG_PATH="$SDL2MIXERDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
- export PATH="$SDL2MIXERDIR/bin:$PATH"
- |
cd $BUID_DIR
if [ ! -d "$SDL2MIXERDIR" ]; then
mkdir -p "$SDL2MIXERDIR" && \
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL_MIXER_VERSION}.tar.gz -O - | tar -xz && \
(cd SDL2_mixer-${SDL_MIXER_VERSION} && \
./configure --prefix=$SDL2MIXERDIR && \
make -j5 && make install)
fi
- export SDL_IMAGE_VERSION="2.0.3"
- export SDL2IMAGEDIR="$HOME/3rd_party/${TRAVIS_OS_NAME}/SDL_image_${SDL_MIXER_VERSION}"
- export PKG_CONFIG_PATH="$SDL2IMAGEDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
- export PATH="$SDL2IMAGEDIR/bin:$PATH"
- |
cd $BUID_DIR
if [ ! -d "$SDL2IMAGEDIR" ]; then
mkdir -p "$SDL2IMAGEDIR" && \
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${SDL_IMAGE_VERSION}.tar.gz -O - | tar -xz && \
(cd SDL2_image-${SDL_IMAGE_VERSION} && \
./configure --prefix=$SDL2IMAGEDIR && \
make -j5 && make install)
fi
- export XMP_VERSION="4.4.1"
- export XMPDIR="$HOME/3rd_party/${TRAVIS_OS_NAME}/XMP_${XMP_VERSION}"
- export PKG_CONFIG_PATH="$XMPDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
- |
cd $BUID_DIR
if [ ! -d "$XMPDIR" ]; then
mkdir -p "$XMPDIR" && \
wget https://sourceforge.net/projects/xmp/files/libxmp/${XMP_VERSION}/libxmp-${XMP_VERSION}.tar.gz -O - | tar -xz && \
(cd libxmp-${XMP_VERSION} && \
./configure --prefix=$XMPDIR && \
make -j5 && make install)
fi
script:
- |
cd $BUID_DIR
cmake -DCMAKE_BUILD_TYPE=Release $TRAVIS_BUILD_DIR
make check_style
make
make test
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then make package; else make package_source; fi
addons:
artifacts:
working_dir: $BUILD_DIR
paths:
- $(ls *.dmg | tr "\n" ":")
- $(ls *.tar.* | tr "\n" ":")
target_paths: $TRAVIS_REPO_SLUG/$TRAVIS_BRANCH