forked from mvdevs/jk2mv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
99 lines (87 loc) · 4.02 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
language: cpp
notifications:
irc:
channels:
- "irc.quakenet.org#jk2mv"
template:
- "%{repository} (%{commit}): %{commit_subject}"
- "%{message} Details: %{build_url}"
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: HOST=linux-x86_64-package
- os: linux
dist: trusty
sudo: required
env: HOST=linux-x86_64-portable
- os: osx
osx_image: xcode8.3
env: HOST=macosx-x86_64-app
- os: osx
osx_image: xcode8.3
env: HOST=macosx-x86_64-portable
before_install: |
git fetch --unshallow
if [[ "$HOST" == linux-x86_64-* ]]; then
docker pull ubuntu:16.04
docker run --name bc -v $TRAVIS_BUILD_DIR:/jk2mv -td ubuntu:16.04 /bin/bash
fi
install: |
if [[ "$HOST" == linux-* ]]; then
docker exec bc apt update
docker exec bc apt -y install git cmake zip rpm debhelper devscripts build-essential libsdl2-dev libgl1-mesa-dev libopenal-dev
else
cd ~
curl -O https://www.libsdl.org/release/SDL2-2.0.7.tar.gz
tar xzf SDL2-2.0.7.tar.gz
cd SDL2-2.0.7/Xcode/SDL
sed -i -e 's/@rpath//g' SDL.xcodeproj/project.pbxproj
xcodebuild -configuration Release
mkdir -p ~/Library/Frameworks/
ln -s `pwd`/build/Release/SDL2.framework ~/Library/Frameworks/
fi
script: |
mkdir $TRAVIS_BUILD_DIR/build/travis
cd $TRAVIS_BUILD_DIR/build/travis
if [[ "$HOST" == linux-* ]]; then
if [[ "$HOST" == *-portable ]]; then
docker exec bc sh -c "cd /jk2mv/build/travis && cmake -DUseInternalLibs=ON -DBuildPortableVersion=ON ../.."
else
docker exec bc sh -c "cd /jk2mv/build/travis && cmake -DUseInternalLibs=ON -DBuildPortableVersion=OFF ../.."
fi
docker exec bc sh -c "cd /jk2mv/build/travis && make"
docker exec bc sh -c "cd /jk2mv/build/travis && make package"
else
if [[ "$HOST" == *-portable ]]; then
cmake -G "Unix Makefiles" -DUseInternalLibs=ON -DBuildPortableVersion=ON ../..
else
cmake -G "Unix Makefiles" -DUseInternalLibs=ON -DBuildPortableVersion=OFF ../..
fi
make
make package
fi
after_script: |
if [[ "$HOST" == linux-* ]]; then docker stop bc; fi
before_deploy: |
cd $TRAVIS_BUILD_DIR
sed -i -e "s/@MV_VERSION@/$(git describe --tags)/g" tools/bintray.json
sed -i -e "s/@MV_DATE@/$(date -u +"%Y-%m-%d")/g" tools/bintray.json
deploy:
- provider: bintray
file: "tools/bintray.json"
user: "ouned"
key:
secure: "Hx3bFrW9MsMPk56drQssykXFJYS/UzaAepqJP3rGOlMTTt1BJ66sHJuGJQYUbt2NzD6ZXq9XEDYS8//wfP5c6IqZPOeeoIPWRWoCLgEiVipC9tLJIyygvVKXSUl4BWfEX5uVdnEVdMQPGf/mWrkbWfgeOiMVgn1NkyV1V/mWrmNfhFsNF8LO9SpXOYPB6Y/lI86Mt34rL0xJ/ibtis7nDGowJZpx7m7tVkuiFBeOklALxpPgkv6p1SaSgsYJvAf8TRLTxi97VmlpvU+5qjPQ1qR9cZOhBi9d1g2CfpimPErzWMaBLZLqkow6LRE/apymLRkf6HFheL2IiZ8OkpV/DqJmHB9/NLQk8b/CGTN385JNKPTbhqAObLTb0d4GfhJzhMamjMYA/zU0+sP+syM6yBZRGH6v5xJfYrajuhQ0lOSpQ4TZ8gwZT1juKhwmxldTY2PERfJr3C+jfZmkEUhP+jjNwB2EUfH+I/UfnmsMvi3wzY+dqhL4DocdSNWWnQ7pEWVCYwiIwkhm1VLqn56Va7QMB+moJBmpGq/oswO2gUJybSdCHv/yYcO9s5dBLOV2f3mhAf84XsBWDm9sCkIF01qs5jICUppvHvPEqg+2kO5V1H0oEr6FQLnxSad+a3YD64n7NODfYsuN+09FKqgBYLdSxuv4Nu7lJlTUW7vsn0g="
skip_cleanup: true
on:
tags: false
- provider: releases
file_glob: true
file: "build/travis/out/*.{deb,rpm,dmg,tar.gz}"
api_key:
secure: "X3KuKuwnHg3M9+P0JeJCzf4nB8e/zGyUdld+Qmxmm6pA+mgW8TNKlC46w3Vlmrdq5j4Apkc8rHF/+hRtk0GKKGETkTIK6O5xfDCoC77BdrFK6HFPxai3qh31Kr1rwSwp1G64utRwJNfTQDCzFQmtJm2B+aaG9K1Ui0h3VMhZvOir51667WoQiM/w2UGBJJKyh29Wm+2mM9tacJWE8v+578UYg4Ypp0hvOcM/gHCmlwL5uKYcSHj5FSCZBFbGuFvBHBi+tFoL5W6BdkI48rOGC8p1JL9d0AtKwT6leGzESVQQSs+NQMX31tEV91gzV1t9L2UVFco29N4FLyt4lzZvROuOCRU41WN7lZUbcSp+MkUpd9WGnmtwQBBnLv1ZzcDmXyw+sWAE5bvgPEclx+JD4Wg+L5Z2NNjrDeHXh+NkPWSRcbzb1Vn5VEi+Yw+DtcU1vPQIRGuVuynILecOgn3IqSr6/baMBRgwvcaBWwim5i0fsAFHnObOvhQm72GX5q56JYYMQcvp6xGaxhWQdq8ArOeJUfB2wc0wnR6wFU7tiNb/vbxehmRPuf8j1bbnS7SVTl8+gt7l7Azgs3TBFRrZjejNfsAGKKVi5g09TBREhHK2Bhv6kQseVNioV3DAqCt8J/xlHOWTY3NJqAUxJN3dl4tYhZ4XV1J7clHr0BqyuwA="
skip_cleanup: true
on:
tags: true