forked from pjasicek/OpenClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.sh
executable file
·71 lines (58 loc) · 1.61 KB
/
travis.sh
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
#!/bin/sh
coverity() {
if [ ${TRAVIS_JOB_NUMBER##*.} -ne 1 ]; then
exit 0
fi
prepare_linux
curl -s "https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" | bash || true
}
prepare_linux() {
sudo apt-get update
sudo apt-get install libsdl2-2.0-0
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-gfx-dev
# sudo apt-get install libtinyxml-dev
sudo apt-get install cmake
}
prepare_android() {
git clone 'https://github.com/loblik/captainclaw-arm-linux-androideabi-4.9.git' ~/android-toolchain
}
prepare_osx() {
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf sdl2_gfx;
# brew install tinyxml;
}
prepare_emscripten() {
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
. ./emsdk_env.sh
cd ..
emcc -v
}
build() {
case "$PLATFORM" in
linux|android|osx|emscripten)
prepare_${PLATFORM}
;;
esac
git config user.email "[email protected]" && git config user.name "Travis CI"
git tag -a -m "Travis build" init
mkdir build; cd build; $CMAKE_EXECUTOR cmake $CMAKE_ARGS ..
case "$PLATFORM" in
windows)
# TODO: MSBuild.exe command not found. Why???
"/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/MSBuild.exe" OpenClaw.sln //p:Configuration=Debug //p:Platform="Win32"
;;
*)
make -j8
;;
esac
}
case "$TRAVIS_EVENT_TYPE" in
cron)
coverity
;;
*)
build
;;
esac