forked from rocket/rocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (74 loc) · 2.49 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
language: c
sudo: false
os:
- linux
- osx
before_script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update &&
brew install qt5 &&
brew install sdl &&
export QT5_PREFIX="`brew --prefix qt5`";
export QMAKE="$QT5_PREFIX/bin/qmake";
fi
- if [ ! -f deps/bass24.zip ]; then
mkdir -p deps && (
cd deps &&
wget http://www.un4seen.com/files/bass24-$TRAVIS_OS_NAME.zip -O bass24.zip
)
fi &&
mkdir examples/include &&
mkdir examples/lib &&
unzip -d bass24 deps/bass24.zip &&
cp bass24/bass.h examples/include/;
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cp bass24/libbass.dylib examples/lib/;
fi;
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
cp bass24/x64/libbass.so examples/lib/;
fi
- if [ -n "$TRAVIS_TAG" ]; then
export VERSION_TAG=${TRAVIS_TAG:1};
else
export VERSION_TAG=$TRAVIS_BRANCH;
fi
script:
- make &&
make examples/example_bass &&
make examples/example_bass-player
cache:
directories:
- deps
addons:
apt:
packages:
- libsdl1.2-dev
before_deploy:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
(cd editor &&
"$QT5_PREFIX/bin/macdeployqt" editor.app &&
prefix="`grealpath $QT5_PREFIX`";
frameworks=(editor.app/Contents/Frameworks/Qt*.framework) &&
frameworks=("${frameworks[@]#editor.app/Contents/Frameworks/}") &&
frameworks=("${frameworks[@]%.framework}") &&
for framework in "${frameworks[@]}"; do
for target in "${frameworks[@]}"; do
install_name_tool -change $prefix/lib/$target.framework/Versions/5/$target @executable_path/../Frameworks/$target.framework/Versions/5/$target editor.app/Contents/Frameworks/$framework.framework/$framework;
done;
done;
for plugin in editor.app/Contents/PlugIns/*/*.dylib; do
for target in "${frameworks[@]}"; do
install_name_tool -change $prefix/lib/$target.framework/Versions/5/$target @executable_path/../Frameworks/$target.framework/Versions/5/$target $plugin;
done;
done;
zip -r rocket-editor-$VERSION_TAG-$TRAVIS_OS_NAME.zip editor.app)
fi
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: aCUNNh7Gevkxjjw6RE6xf1JpWPIHFrmmTGBsOgJ9J0hLDanxZRVZM0f4xgK3PArIFjL/9l3ollGlTjZuvkpiU7SieIpfbA5XJHwl/P1Kyw7lTu81e+CWttVDfL9r/x3JTT42lSM6ICLOJLuvZryrnNxRGTcntxebm7+g2vmh8nQ=
file: editor/rocket-editor-$VERSION_TAG-$TRAVIS_OS_NAME.zip
on:
tags: true
condition: $TRAVIS_OS_NAME = osx