-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
144 lines (126 loc) · 5.1 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
language: cpp
dist: xenial
osx_image: xcode10.1
matrix:
include:
- name: Linux
os: linux
compiler: gcc
addons:
apt:
packages: [scons, pkg-config, build-essential, p7zip-full]
env: PLATFORM=x11 ADDITIONAL_FLAGS="tools=no use_llvm=yes target=release bits=64"
- name: MacOS
os: osx
osx_image: xcode10.2
compiler: clang
env: ADDITIONAL_FLAGS="" PLATFORM="osx"
addons:
homebrew:
packages:
- jq
- p7zip
- name: Windows
os: windows
env: ADDITIONAL_FLAGS="" PLATFORM="windows"
- name: Android ARM
os: linux
env: ADDITIONAL_FLAGS="android_arch=armv7" PLATFORM="android"
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
[scons, pkg-config, build-essential, p7zip-full, clang-format-6.0]
- name: Android ARM64
os: linux
env: ADDITIONAL_FLAGS="android_arch=arm64v8" PLATFORM="android"
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
[scons, pkg-config, build-essential, p7zip-full, clang-format-6.0]
- name: iOS
os: osx
osx_image: xcode10.2
compiler: clang
env: ADDITIONAL_FLAGS="target=release" PLATFORM="iphone"
addons:
homebrew:
packages:
- jq
- p7zip
install:
- if [[ "$PLATFORM" == "x11" ]]; then
sudo apt-get install -y build-essential scons pkg-config libx11-dev libxcursor-dev libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libfreetype6-dev libssl-dev libudev-dev libxi-dev libxrandr-dev yasm;
fi
- if [[ "$PLATFORM" == "android" ]]; then
cd .. && sh godot-fmod-integration/.travis/download_android_sdk.sh && cd godot-fmod-integration;
fi
- rm -rf api
- mv .travis/download-fmod.sh ./ && chmod +x download-fmod.sh && ./download-fmod.sh $FMODUSER $FMODPASS $PLATFORM
- if [[ "$PLATFORM" == "x11" ]]; then tar -xvf fmodstudioapi20006linux.tar.gz; fi
- if [[ "$PLATFORM" == "osx" ]]; then hdiutil attach fmodstudioapi20006mac-installer.dmg; fi
- if [[ "$PLATFORM" == "windows" ]]; then
7z x fmodstudioapi20006win-installer.exe;
mv api/core/lib/x64/fmod_vc.lib api/core/lib/x64/fmod_vc.windows.tools.64.lib;
mv api/studio/lib/x64/fmodstudio_vc.lib api/studio/lib/x64/fmodstudio_vc.windows.tools.64.lib;
fi
- if [[ "$PLATFORM" == "iphone" ]]; then hdiutil attach fmodstudioapi20006ios-installer.dmg; fi
- if [[ "$PLATFORM" == "android" ]]; then tar -xvf fmodstudioapi20006android.tar.gz; fi
- if [[ "$PLATFORM" == "x11" ]]; then mv fmodstudioapi20006linux/api ./; fi
- if [[ "$PLATFORM" == "osx" ]]; then cp -r "/Volumes/FMOD Programmers API Mac/FMOD Programmers API/api" ./; fi
- if [[ "$PLATFORM" == "iphone" ]]; then cp -r "/Volumes/FMOD Programmers API iOS/FMOD Programmers API/api" ./; fi
- if [[ "$PLATFORM" == "android" ]]; then mv fmodstudioapi20006android/api ./; fi
- cd .. && git clone https://github.com/godotengine/godot.git && cd godot && git checkout 3.1.1-stable
- mv ../godot-fmod-integration modules/fmod
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install scons;
fi
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
curl -LO https://downloads.sourceforge.net/project/scons/scons-local/3.0.5/scons-local-3.0.5.zip;
unzip scons-local-3.0.5.zip;
fi
script:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
export SCONS="./scons.bat";
else
export SCONS="scons";
fi
- if [[ "$PLATFORM" == "android" ]]; then
$SCONS platform=$PLATFORM $ADDITIONAL_FLAGS target=release;
$SCONS platform=$PLATFORM $ADDITIONAL_FLAGS target=debug;
else
$SCONS platform=$PLATFORM $ADDITIONAL_FLAGS;
fi
- if [[ "$STATIC_CHECKS" == "yes" ]]; then
sh ./misc/travis/clang-format.sh;
fi
- if [[ "$ADDITIONAL_FLAGS" == "android_arch=arm64v8" ]]; then
rm platform/android/java/libs/release/arm64-v8a/libfmod.so && rm platform/android/java/libs/release/arm64-v8a/libfmodstudio.so;
rm platform/android/java/libs/debug/arm64-v8a/libfmod.so && rm platform/android/java/libs/debug/arm64-v8a/libfmodstudio.so;
tar zcvf libgodot.android_arm64-v8a.tar.gz platform/android/java/libs/;
mv libgodot.android_arm64-v8a.tar.gz bin/;
fi
- if [[ "$ADDITIONAL_FLAGS" == "android_arch=armv7" ]]; then
rm platform/android/java/libs/release/armeabi-v7a/libfmod.so && rm platform/android/java/libs/release/armeabi-v7a/libfmodstudio.so;
rm platform/android/java/libs/debug/armeabi-v7a/libfmod.so && rm platform/android/java/libs/debug/armeabi-v7a/libfmodstudio.so;
tar zcvf libgodot.android_armeabi-v7a.tar.gz platform/android/java/libs/;
mv libgodot.android_armeabi-v7a.tar.gz bin/;
fi
deploy:
provider: releases
api_key:
secure: $TRAVIS_TOKEN
file:
- 'bin/godot.windows.tools.64.exe'
- 'bin/godot.x11.opt.64.llvm'
- 'bin/godot.osx.tools.64'
- 'bin/libgodot.android_arm64-v8a.tar.gz'
- 'bin/libgodot.android_armeabi-v7a.tar.gz'
- 'bin/libgodot.iphone.opt.arm64.a'
skip_cleanup: true
on:
tags: true