forked from schismtracker/schismtracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (94 loc) · 3.35 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
language: c
os:
- linux
- osx
env:
global:
- DIR_NAME=${PWD##*/}
- BRANCH=${TRAVIS_BRANCH##*/}
- BINARIES_ARTIFACT="$TRAVIS_BUILD_DIR/build/schismtracker-$BRANCH-$TRAVIS_OS_NAME.tar.gz"
- SOURCE_CODE_ARTIFACT="schismtracker-${BRANCH}.source.tar.gz"
- YEAR=$(date +'%Y')
- MACOSX_DEPLOYMENT_TARGET=10.11
matrix:
include:
- os: linux
- os: linux
dist: trusty
- os: osx
osx_image: beta-xcode6.1
- os: osx
osx_image: beta-xcode6.2
- os: osx
osx_image: beta-xcode6.3
- os: osx
osx_image: xcode6.4
- os: osx
osx_image: xcode7
- os: osx
osx_image: xcode7.1
- os: osx
osx_image: xcode7.2
- os: osx
osx_image: xcode7.3
- os: osx
osx_image: xcode8
addons:
apt:
packages:
- libsdl1.2-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl; fi
before_script:
- cd ..
- tar --exclude='schismtracker/.git' -cvzf $SOURCE_CODE_ARTIFACT $DIR_NAME
- mv $SOURCE_CODE_ARTIFACT $DIR_NAME
- cd $DIR_NAME
script:
- autoreconf -i
- mkdir -p build
- cd build
- sh ../configure
- make
- grep '^Schism Tracker' <(./schismtracker --version)
after_success:
- cd ..
- mkdir -p schismtracker
- |
cp README.md \
COPYING \
docs/configuration.md \
schismtracker/
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
mkdir -p ./schismtracker/Schism\ Tracker.app/Contents/MacOS
cp -r ./sys/macosx/Schism_Tracker.app/* ./schismtracker/Schism\ Tracker.app/
sed -i '' "s/<string>Copyright<\/string>/<string>Schism Tracker $TRAVIS_TAG Copyright 2003-$YEAR Storlek<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist
sed -i '' "s/<string>CFBundleShortVersionString<\/string>/<string>$TRAVIS_TAG<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist
sed -i '' "s/<string>CFBundleVersion<\/string>/<string>$TRAVIS_BUILD_NUMBER<\/string>/g" ./schismtracker/Schism\ Tracker.app/Contents/Info.plist
cp build/schismtracker ./schismtracker/Schism\ Tracker.app/Contents/MacOS/
cp libs/libSDL-1.2.0.dylib ./schismtracker/Schism\ Tracker.app/Contents/MacOS/
install_name_tool -change /usr/local/opt/sdl/lib/libSDL-1.2.0.dylib @executable_path/libSDL-1.2.0.dylib ./schismtracker/Schism\ Tracker.app/Contents/MacOS/schismtracker
else
cp build/schismtracker \
sys/posix/schismtracker.1 \
sys/fd.org/schism.desktop \
schismtracker/
fi
- tar -cvzf "$BINARIES_ARTIFACT" schismtracker
notifications:
email:
on_success: change
on_failure: change
deploy:
provider: releases
api_key:
secure: K4vJ1+jbWBRSFcHOAiDNgJ2T0pKbF3ZaEIa7qPXGznE1dYnORndTVz29FBo8/TBhiZEyEPwdOik/CbOp8HhSa1QmLvsRCBTsN/JHquV4eN3Yyvu2Rmj+M7Krj/4zoPA6j00D7uzfrknnAAPpacN3OjhSZNxr9hF3FFcjbP4E7Sa2ixHSuKWAzqm7SayxE6rAi9siDf+QyXnQEgyYZQvVfZ29/7YjYef0o+RGuau9V8ygVx8Ul109dESU0PyLqr785hJA5tIUCwMKvXKQPmRXGNuL7DgYN/MvbVS/GS5gStO8VjEGosABO1f+rVrI6PToS9ffYyG2Mc/KP4orWe6DSGcvhY8u1M6XTznLZOROyPEF9swywkcHIQfKa8smvwW/w/XDgjYBU6ixK+sP9pP/fXGZsQ5mYW8O6IaqeL9zS9qFqjBNiCJEavki5u9FNafEf+tx+oyC2vF0M6kDTL1uWX1fHeg7BayFFoboQ4PFQ1EEx4hf2TY8Pcdbz4BwRI6CJO/Z4QGET6/Dml9ca4PTFxkh5nFkEo7JS9/t+eokPz5Rn4UphjE6MI8YPaNV5D/Ouh9JmXsJ9KjDeoaj7gUId14OJIW4qef5h0FrUJ0CIXej2vOTkGiZLqf/m3t/EKuZxpDV4vL0n/DgctnHpjcyIRJC2/pHkMAnHM0BVbfxu6E=
file:
- "$BINARIES_ARTIFACT"
- "$SOURCE_CODE_ARTIFACT"
skip_cleanup: true
on:
tags: true