forked from sdlpal/sdlpal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
253 lines (240 loc) · 9.54 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
language: c
env:
global:
- CACHE=$HOME/.sdlpal-caches
cache:
branch: md5deep
directories:
- $CACHE
before_script:
- mkdir deploy
matrix:
fast_finish: true
include:
- os: linux
env: TARGET=Linux
addons:
apt:
packages:
- libsdl2-dev
- libfltk1.3-dev
- upx-ucl
script:
- cd unix
- make
- upx --best --lzma sdlpal
- mv sdlpal ../deploy/sdlpal-linux
- make clean
- make check
- cd ..
- os: linux
env: TARGET=MinGW32 SDL2_VERSION=2.0.8
addons:
apt:
packages:
- binutils-mingw-w64-i686
- gcc-mingw-w64-i686
- g++-mingw-w64-i686
- zip
- upx-ucl
before_install:
- cd win32
- |
if ! [ -d $CACHE/SDL2-$SDL2_VERSION ]
then
export PUSHD="$(pwd)"
mkdir -p "${CACHE}"
cd $CACHE
wget http://libsdl.org/release/SDL2-devel-$SDL2_VERSION-mingw.tar.gz
tar xvf SDL2-devel-$SDL2_VERSION-mingw.tar.gz
sed -i "s@/usr/local@$PUSHD/SDL2-$SDL2_VERSION@g" SDL2-$SDL2_VERSION/i686-w64-mingw32/bin/sdl2-config
rm *.gz
cd "${PUSHD}"
fi
- ln -sf $CACHE/SDL2-$SDL2_VERSION
- export PATH=$(pwd)/SDL2-$SDL2_VERSION/i686-w64-mingw32/bin:$PATH
- cat SDL2-$SDL2_VERSION/i686-w64-mingw32/bin/sdl2-config
- cd ..
script:
- cd win32
- make HOST=i686-w64-mingw32-
- i686-w64-mingw32-strip -s sdlpal.exe
- upx --best --lzma sdlpal.exe
- zip sdlpal-win32-mingw.zip sdlpal.exe
- mv sdlpal-win32-mingw.zip ../deploy/
- cd ..
- os: linux
env: TARGET=wii
before_install:
- export DEVKITPRO=$CACHE/devkitPro
- export DEVKITPPC=${DEVKITPRO}/devkitPPC
- export PATH=$DEVKITPPC/bin:$PATH
- |
if ! [ -f $DEVKITPRO/libogc/include/gctypes.h ]
then
rm -rfv $DEVKITPRO
fi
- |
if ! [ -d $DEVKITPRO ]
then
export PUSHD="$(pwd)"
mkdir -p $DEVKITPRO
(
cd $DEVKITPRO &&
wget https://media.githubusercontent.com/media/sdlpal/tools/master/devkitPPC_r27-x86_64-linux.tar.bz2 &&
wget https://media.githubusercontent.com/media/sdlpal/tools/master/libogc-1.8.12.tar.bz2 &&
wget https://media.githubusercontent.com/media/sdlpal/tools/master/libfat-ogc-1.0.13.tar.bz2 &&
wget https://github.com/dborth/sdl-wii/releases/download/2013-10-28/SDL.Wii.10-28-2013.zip
)&&(
cd $DEVKITPRO
tar xvf devkitPPC_r27-x86_64-linux.tar.bz2
mkdir libogc
tar xvf libogc-1.8.12.tar.bz2 -C libogc
tar xvf libfat-ogc-1.0.13.tar.bz2 -C libogc
unzip SDL.Wii.10-28-2013.zip
rm -v *.zip *.bz2
echo "cache finished!"
)||(
rm -rfv $DEVKITPRO
echo "download failed! clearing cache"
)
fi
script:
- cd wii
- make
- tar cvjf ../deploy/sdlpal-wii.tar.bz2 icon.png meta.xml boot.dol
- make clean
- cd ..
- os: linux
env: TARGET=3ds
sudo: enabled
addons:
apt:
packages:
- unzip
before_install:
- export PUSHD="$(pwd)"
- mkdir -p $CACHE/
- cd $CACHE/
- wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb
- sudo dpkg -i devkitpro-pacman.deb
- sudo dkp-pacman -Syu
- sudo dkp-pacman -S 3ds-dev --noconfirm
- export DEVKITPRO=/opt/devkitpro
- export DEVKITARM=/opt/devkitpro/devkitARM
- sudo chown $(whoami):$(whoami) /opt/devkitpro
- rm -rf SDL-1.2-N3DS
- git clone https://github.com/zephray/SDL-1.2-N3DS.git
- cd SDL-1.2-N3DS/SDL-1.2.15
- cp Makefile.n3ds Makefile
- make
- make install
- wget https://github.com/profi200/Project_CTR/releases/download/0.15/makerom_015_ctrtool.zip
- unzip makerom_015_ctrtool.zip
- sudo mkdir -p /opt/ctrtool/bin
- sudo cp Linux_x86_64/* /opt/ctrtool/bin/
- sudo chmod +x /opt/ctrtool/bin/*
- export PATH=/opt/ctrtool/bin:$PATH
- cd "${PUSHD}"
script:
- cd 3ds
- make
- make cia
- cp sdlpal.cia ../deploy/sdlpal-3ds.cia
- os: linux
language: android
env: TARGET=Android SDK_HASH=3859397 NDK_VERSION=r16 TERM=dumb
cache:
branch: md5deep
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/dists/
before_install:
- export PUSHD="$(pwd)"
- mkdir -p $CACHE/
- cd $CACHE/
# After measuring, caching android SDK/NDK is more slow than direct download
- wget https://dl.google.com/android/repository/sdk-tools-linux-$SDK_HASH.zip -O sdk-tools.zip
- unzip -o sdk-tools.zip > /dev/null
- export PATH=$(pwd)/tools/bin:$PATH
# Due to latest Android Plugin for Gradle decides to ignores buildToolsVersion setting,
# we cannot simply continue using travis-ci built-in android sdk tools(previous pairs),
# since it uses fixed version and needs accept license, which varying times and times.
# Instead, we directly use latest sdkmanager and accept all available licenses.
- yes | sdkmanager --licenses > /dev/null
- cp -rv licenses $ANDROID_HOME
- wget http://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip -O ndk.zip
- unzip ndk.zip > /dev/null
- export ANDROID_NDK_HOME=`pwd`/android-ndk-$NDK_VERSION
- cd "${PUSHD}"
script:
- cd android
- ./gradlew assembleRelease
- cd ..
- jarsigner -storetype pkcs12 -keystore winrt/SDLPal.UWP/SDLPal_TemporaryKey.pfx -sigalg SHA1withRSA -digestalg SHA1 -signedjar deploy/sdlpal-release.apk -storepass "" android/app/build/outputs/apk/release/app-release-unsigned.apk bca4145d-30d4-4f88-9549-dc57a851a38a
- os: osx
osx_image: xcode9.2
env: TARGET=iOS
cache: cocoapods
podfile: ios/SDLPal/Podfile
script:
- cd ios/SDLPal
- pod install
- xcodebuild -workspace SDLPal.xcworkspace -scheme SDLPal ONLY_ACTIVE_ARCH=NO CODE_SIGNING_ALLOWED=NO -configuration Release CONFIGURATION_BUILD_DIR=/tmp/sdlpal-build
- mkdir -p Payload
- mv /tmp/sdlpal-build/SDLPal.app Payload
- zip ../../deploy/sdlpal-impactor.ipa -r Payload
- cd ../..
- os: osx
osx_image: xcode9.2
env: TARGET=macOS
language: objective-c
script:
- cd macos
- xcodebuild -project Pal.xcodeproj -configuration Release
- hdiutil create -srcfolder build/Release/Pal.app -volname "SDLPal" ../deploy/sdlpal-macos.dmg
- #xcodebuild test -scheme PalTests #disabled since always fail in travis-ci
- cd ..
- os: osx
osx_image: xcode9.2
env: TARGET=macOS SDL=1.2.15
before_install:
- |
if ! [ -d /Library/Frameworks/SDL.framework ]
then
export PUSHD="$(pwd)"
mkdir -p "${CACHE}"
cd "${CACHE}"
if ! [ -f SDL-$SDL.dmg ]
then
curl -O -L https://www.libsdl.org/release/SDL-$SDL.dmg
fi
hdiutil attach SDL-$SDL.dmg
sudo cp -a /Volumes/SDL/SDL.framework /Library/Frameworks/
hdiutil detach /Volumes/SDL
rm *.dmg
cd "${PUSHD}"
fi
script:
- cd macos
- xcodebuild -project Pal_SDL12.xcodeproj -configuration Release
- hdiutil create -srcfolder build/Release/Pal.app -volname "SDLPal-SDL1" ../deploy/sdlpal-sdl1-macos.dmg
- cd ..
deploy:
provider: releases
api_key:
secure: FFV8UBcz6GkeSoGRbrL9tnTpVqXoFjFK2QtW0Ml8YvvqaHhxOaIWs2nAabOGsW1mJop/QlpuUNw1TfLl7TokcUDgOHrFRdC8hVY7K1uSWMnt7m4ZRPatVybIkzgrnItHlnMrL4uJK2xXb6Jc5+cSrU5jRMcmTZjaOKLTBwF97+6AgqpdmKUCVYZJzQYg0Jn9GfaL1EOGl7ISt/VEgi/tKFzJvJVxJBU3NuKyxXlfEwkTiSOFuGoD5qWDjCE+aGxTR6RQefsADPIDfeU3TJHTJE/ORGy9gl+Y41JgU0Bfgipcqg1RSwNclclmxgi8lo/XNUiZAMTyQrXjByBWcvYovk+H4h9mbvJlrVSjI8Wxb5ICcYkhDVkNxtEXX7AsIk4yHiNTi1MAW0qJJKinaFxLmK2U3LGEK3DudXl/0eVRoQATmRcXLdBQezISt2CWpTktCxlQmtz/GsoHv0PcWdkJYL4qbbRrBRFj9++VjlnCI124YZnbVjC3+jtWN1Zluxynj0GDBY3r7EdLWWKZo5XnygPOZ8+uaTMYfqmTvQWPc5GRRRdVJowQFQhb48hzKyWYqsf8eyS3VuZ9b/DwES3dutOaX7sIL9Vkg3DlQYOEz938MB4VbTGizUUrBbrIP4Kz/+WOZ9pxM9X+qsgMYkw8FvHqn2TvCWxPDCgqq3zUWig=
file_glob: true
file: deploy/*
skip_cleanup: true
overwrite: true
on:
all_branches: true
tags: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/922838d6727e919df50e
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always