forked from ihhub/fheroes2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
133 lines (128 loc) · 4.82 KB
/
Copy path.travis.yml
File metadata and controls
133 lines (128 loc) · 4.82 KB
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
sudo: required
language: cpp
# blocklist
branches:
except:
- /^fheroes2-windows-.*$/
- /^fheroes2-linux-.*$/
- /^fheroes2-osx-.*$/
matrix:
include:
- os: linux
name: "Linux with SDL 1.2"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl1.2-dev
- sudo apt-get install -y libsdl-ttf2.0-dev
- sudo apt-get install -y libsdl-mixer1.2-dev
- sudo apt-get install -y libsdl-image1.2-dev
before_deploy:
- zip fheroes2_linux_sdl1.zip fheroes2 LICENSE script/linux/install_sdl_1.sh script/linux/install_sdl_2.sh script/demo/demo_linux.sh
- export TRAVIS_TAG=fheroes2-linux-sdl1_dev
- git tag -f $TRAVIS_TAG
deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file: "fheroes2_linux_sdl1.zip"
skip_cleanup: true
name: Linux build with SDL 1 support (latest commit)
body: Compiled version of $TRAVIS_COMMIT commit
prerelease: true
overwrite: true
on:
branch: master
- os: linux
name: "Linux with SDL 2.0"
before_install:
- sudo apt-get update
- sudo apt-get install -y libsdl2-dev
- sudo apt-get install -y libsdl2-ttf-dev
- sudo apt-get install -y libsdl2-mixer-dev
- sudo apt-get install -y libsdl2-image-dev
- export WITH_SDL2="ON"
before_deploy:
- zip fheroes2_linux_sdl2.zip fheroes2 LICENSE script/linux/install_sdl_1.sh script/linux/install_sdl_2.sh script/demo/demo_linux.sh
- export TRAVIS_TAG=fheroes2-linux-sdl2_dev
- git tag -f $TRAVIS_TAG
deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file: "fheroes2_linux_sdl2.zip"
skip_cleanup: true
name: Linux build with SDL 2 support (latest commit)
body: Compiled version of $TRAVIS_COMMIT commit
prerelease: true
overwrite: true
on:
branch: master
- os: osx
name: "OSX with SDL 1.2"
before_install:
- brew install sdl
- brew install sdl_ttf
- brew install sdl_mixer
- brew install sdl_image
- brew install gettext
- export PATH="/usr/local/opt/gettext/bin:$PATH"
before_deploy:
- zip fheroes2_osx_sdl1.zip fheroes2 LICENSE script/macos/install_sdl_1.sh script/macos/install_sdl_2.sh script/demo/demo_macos.sh
- export TRAVIS_TAG=ffheroes2-osx-sdl1_dev
- git tag -f $TRAVIS_TAG
deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file: "fheroes2_osx_sdl1.zip"
skip_cleanup: true
name: MacOS build with SDL 1 support (latest commit)
body: Compiled version of $TRAVIS_COMMIT commit
prerelease: true
overwrite: true
on:
branch: master
- os: osx
name: "OSX with SDL 2.0"
before_install:
- brew install sdl2
- brew install sdl2_ttf
- brew install sdl2_mixer
- brew install sdl2_image
- brew install gettext
- export PATH="/usr/local/opt/gettext/bin:$PATH"
- export WITH_SDL2="ON"
before_deploy:
- zip fheroes2_osx_sdl2.zip fheroes2 LICENSE script/macos/install_sdl_1.sh script/macos/install_sdl_2.sh script/demo/demo_macos.sh
- export TRAVIS_TAG=fheroes2-osx-sdl2_dev
- git tag -f $TRAVIS_TAG
deploy:
provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file: "fheroes2_osx_sdl2.zip"
skip_cleanup: true
name: MacOS build with SDL 2 support (latest commit)
body: Compiled version of $TRAVIS_COMMIT commit
prerelease: true
overwrite: true
on:
branch: master
- os: linux
name: "Static analysis"
before_install:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
curl -L http://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py -o $TRAVIS_BUILD_DIR/script/tools/clang-format-diff.py;
fi
script:
- export EXCLUDE_PATTERN_1=" not found in expected header ";
- export EXCLUDE_PATTERN_2=" does not need to be \#included; use a forward declaration instead";
- export EXCLUDE_PATTERN_3=" not found in any directly \#included header";
- export EXCLUDE_PATTERN_4=" unable to find ";
- git clone https://github.com/myint/cppclean;
- ./cppclean/cppclean src | grep -v "$EXCLUDE_PATTERN_1" | grep -v "$EXCLUDE_PATTERN_2" | grep -v "$EXCLUDE_PATTERN_3" | grep -v "$EXCLUDE_PATTERN_4";
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "Checking clang-format between TRAVIS_BRANCH=$TRAVIS_BRANCH and TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH"
bash $TRAVIS_BUILD_DIR/script/tools/check_code_format.sh
fi
script:
- |
make