forked from mapeditor/tiled
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
181 lines (178 loc) · 6.16 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
language: cpp
sudo: required
dist: xenial
python: 3.6
env:
global:
- secure: J8Y+eQD0p5YPOlhBEPFgpZzhRFjXC4phiiFtGV3JaYX34wxCsyyNhMStMqIZTBL4D9lQojfLgXODBDaqT1iSHDe1oonosnyYnGBIJElez247pjuNiSSvcAbYa9RQnwfHe8JFphQHViURbv0OfqpHHyAlHy5b8nrPYWG2xmHA5nY=
- secure: VgouZ5cStqlgODwIuLIvIBN5gkmrP95agCS3BorLm7g/iXM4cwuaV+bov9FiSlnzcnWfpsNMsFt5xDU2Oc17N0Kyx531MIA1H5h9xdzj/IhjhLcOOqYeXt3lN2quRE2maIZDSrPVr3eY0o6xdcNkeK0jpX/mgIiSHwXOclXv+6o=
- QT_INSTALL_DIR=~/Qt
- QT_VERSION=5.15.1
- QTCREATOR_VERSION=4.13.1
cache:
directories:
- ${QT_INSTALL_DIR}
- ~/.ccache
addons:
coverity_scan:
project:
name: bjorn/tiled
description: A generic tile map editor
notification_email: bjorn@lindeijer.nl
build_command_prepend: qmake
build_command: make
branch_pattern: coverity_scan
notifications:
irc:
channels:
- chat.freenode.net#tiled
on_success: change
on_failure: always
use_notice: true
skip_join: true
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- binutils
- g++-7
- libgl1-mesa-dev
- libxkbcommon-x11-0
- zlib1g-dev
- libzstd-dev
- p7zip-full
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- QT_BIN=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64/bin
- PATH="${QT_INSTALL_DIR}/Tools/QtCreator/bin:${QT_BIN}:${PATH}"
before_install:
- eval "${MATRIX_EVAL}"
- ./dist/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} qtbase qtdeclarative qtscript qtsvg qtimageformats qttools icu
- ./dist/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QTCREATOR_VERSION} qtcreator
script:
- qbs --version
- qbs setup-toolchains --detect
- qbs config defaultProfile x86_64-linux-gnu-gcc-7
- qbs install --install-root Tiled config:release qbs.installPrefix:/usr projects.Tiled.version:$TILED_VERSION projects.Tiled.enableZstd:true
- cp LICENSE* COPYING *md Tiled/
after_success:
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
-O linuxdeployqt
- chmod a+x linuxdeployqt
- unset QTDIR; unset QT_PLUGIN_PATH; unset LD_LIBRARY_PATH
- "./linuxdeployqt ./Tiled/usr/share/applications/org.mapeditor.Tiled.desktop
-bundle-non-qt-libs -extra-plugins=imageformats/libqsvg.so -exclude-libs=libpython3.5m.so.1
-verbose=2"
- ./linuxdeployqt --appimage-extract
- export PATH=$(readlink -f ./squashfs-root/usr/bin/):$PATH
- ./squashfs-root/usr/bin/appimagetool Tiled/
- find ./Tiled -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d
" " -f 2-3 | sort | uniq
- mv Tiled-x86_64.AppImage Tiled-$TILED_VERSION-x86_64.AppImage
deploy:
- provider: releases
skip_cleanup: true
draft: true
tag_name: "$TRAVIS_TAG"
api_key:
secure: g8B2MDEElF5v1K1awuhB1C54Fbl2eUmKdfJTPhYC8kYiLoWClgufOPavJOHO+hH5us1LtbCvOa6Z+lrSe9YnuwNcV2MKENQQ4CjpViEI51wpAOM1/WW+C7tDu2BNFKCJjldRrSGttFD2lgVbNYBY7w56/2stZNRBuTfdE8YZEFc=
file: Tiled*.AppImage
file_glob: true
on:
repo: bjorn/tiled
tags: true
- provider: script
skip_cleanup: true
on:
repo: bjorn/tiled
branch: snapshot
script: dist/linux/push-to-itch.sh
- os: linux
compiler: clang
addons:
apt:
packages:
- binutils
- cppcheck
- libgl1-mesa-dev
- xvfb
- zlib1g-dev
- libzstd-dev
env:
- QMAKESPEC=linux-clang
- MAKEFLAGS=-j2
before_install:
- sudo add-apt-repository --yes ppa:beineri/opt-qt563-xenial
- sudo apt-get update -qq
- sudo apt-get -y install qt56base qt56svg qt56tools
- source /opt/qt56/bin/qt56-env.sh
- qmake -version
script:
- qmake "CONFIG+=tiled_zstd"
- make
- pushd tests/
- qmake "CONFIG+=tiled_zstd"
- make
- for test in `find -executable -type f`; do pushd `dirname $test`; xvfb-run -a
./`basename $test`||exit 1; popd; done
- popd
after_script:
- cppcheck --enable=all -q -Isrc/libtiled `git ls-files src/\*.cpp`
- os: osx
addons:
homebrew:
packages:
- p7zip
- ccache
update: true
env:
- MAKEFLAGS=-j2
- QT_BIN=${QT_INSTALL_DIR}/${QT_VERSION}/clang_64/bin
- PATH="${QT_INSTALL_DIR}/Qt Creator.app/Contents/MacOS:${QT_BIN}:${PATH}"
before_install:
- ./dist/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QT_VERSION} qtbase qtdeclarative qtscript qtsvg qtimageformats qttools
- ./dist/install-qt.sh -d ${QT_INSTALL_DIR} --version ${QTCREATOR_VERSION} qtcreator
- git clone --depth 1 -b master https://github.com/facebook/zstd.git
- cd zstd/lib
- make libzstd.a
- cd ../../
script:
- qbs --version
- qbs setup-toolchains --detect
- qbs config defaultProfile xcode
- ccache -zs
- qbs install --install-root install config:release qbs.installPrefix:"" projects.Tiled.version:$TILED_VERSION projects.Tiled.enableZstd:true modules.cpp.compilerWrapper:ccache
- ccache -s
- macdeployqt install/Tiled.app -verbose=2
- pushd install
- ruby ../dist/macos/fixup-install-names.rb
- ditto -c -k --sequesterRsrc --keepParent Tiled.app ../Tiled-$TILED_VERSION-macos.zip
- popd
deploy:
- provider: releases
skip_cleanup: true
draft: true
tag_name: "$TRAVIS_TAG"
api_key:
secure: g8B2MDEElF5v1K1awuhB1C54Fbl2eUmKdfJTPhYC8kYiLoWClgufOPavJOHO+hH5us1LtbCvOa6Z+lrSe9YnuwNcV2MKENQQ4CjpViEI51wpAOM1/WW+C7tDu2BNFKCJjldRrSGttFD2lgVbNYBY7w56/2stZNRBuTfdE8YZEFc=
file: Tiled-*-macos.zip
file_glob: true
on:
repo: bjorn/tiled
tags: true
- provider: script
skip_cleanup: true
on:
repo: bjorn/tiled
branch: snapshot
script: dist/macos/push-to-itch.sh
before_script:
- if [[ "$TRAVIS_TAG" ]]; then export TILED_RELEASE=true ; fi
- if [[ "$TRAVIS_TAG" ]]; then export TILED_VERSION=${TRAVIS_TAG:1} ; fi
- if [[ "$TRAVIS_TAG" == "" ]]; then export TILED_VERSION=$(date "+%Y.%m.%d") ; fi
- if [[ "$TRAVIS_BRANCH" == "snapshot" ]]; then export TILED_SNAPSHOT=true ; fi