forked from aardappel/treesheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (108 loc) · 4.85 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
# Add [ci skip] to the commit message to prevent test execution
# whitelist
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)/
notifications:
slack:
on_success: change
cache:
directories:
- wxWidgets
- wxWidgets/build_osx
language: cpp
os:
- linux
- osx
dist: trusty
sudo: required
compiler: gcc
env:
- WXLIB="libwxgtk3.1-dev"
matrix:
allow_failures:
- os: linux
env: WXLIB="libwxgtk3.1-dev"
include:
- os: linux
env: WXLIB="libwxgtk3.0-dev"
- os: osx
osx_image: xcode10.2
compiler: gcc clang
env: WXLIB="libwxgtk3.1-dev"
exclude:
- os: osx
compiler: gcc
env: WXLIB="libwxgtk3.1-dev"
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo apt-get update -qq;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install -qq g++-7;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
rm -rf wxWidgets;
if [[ ! -d wxWidgets ]]; then
git submodule init &&
git submodule add -f https://github.com/wxWidgets/wxWidgets.git;
fi;
git submodule update --init --recursive;
if [[ ! -d wxWidgets/build_osx ]]; then
mkdir -p wxWidgets/build_osx ;
fi;
pushd wxWidgets/build_osx &&
../configure --enable-unicode --disable-shared --with-osx_cocoa --without-libtiff CXXFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++" OBJCXXFLAGS="-stdlib=libc++" --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk --with-macosx-version-min=10.7 CC=clang CXX=clang++ &&
make &&
sudo make install &&
popd ;
else
if [[ "$WXLIB" = "libwxgtk3.1-dev" ]]; then
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc &&
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.1.0/ubuntu/ trusty universe';
fi;
sudo apt-get update &&
sudo apt-get install -y $WXLIB ;
fi
script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
xcodebuild -project osx/TreeSheets/TreeSheets.xcodeproj
elif [[ "$TRAVIS_OS_NAME" == "linux" && "$WXLIB" == "libwxgtk3.0-dev" ]]; then
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make -j$(nproc)
make DESTDIR=appdir -j$(nproc) install
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
# FIXME: The following reshuffling can be removed once https://github.com/aardappel/treesheets/issues/133 is resolved
mkdir -p appdir/usr/share/applications # FIXME
mv appdir/usr/treesheets.desktop appdir/usr/share/applications/ # FIXME
sed -i -e 's|^Exec=.*|Exec=treesheets|g' appdir/usr/share/applications/treesheets.desktop
sed -i -e 's|^Icon=.*|Icon=treesheets|g' appdir/usr/share/applications/treesheets.desktop
mkdir -p appdir/usr/bin/ # FIXME
mv appdir/usr/docs appdir/usr/bin/ # FIXME
mv appdir/usr/examples appdir/usr/bin/ # FIXME
mv appdir/usr/treesheets appdir/usr/bin/ # FIXME
mv appdir/usr/translations appdir/usr/bin/ # FIXME
strip TS/treesheets # FIXME
cp TS/treesheets appdir/usr/bin/ # FIXME
ls -lh appdir/usr/bin/treesheets && chmod a+x appdir/usr/bin/treesheets
mv appdir/usr/scripts appdir/usr/bin/ # FIXME
mv appdir/usr/images appdir/usr/bin/ # FIXME
mkdir -p appdir/usr/share/icons/hicolor/scalable/apps/ # FIXME
cp appdir/usr/bin/images/treesheets.svg appdir/usr/share/icons/hicolor/scalable/apps/ # FIXME
( cd appdir ; ln -s usr/bin/docs/ usr/bin/examples/ usr/bin/images/ usr/bin/scripts/ usr/bin/translations/ . )
sed -i -e 's|1011|1002|g' appdir/usr/bin/treesheets # https://github.com/aardappel/treesheets/issues/130#issuecomment-528075693
# Workaround to increase compatibility with older systems; see https://github.com/darealshinji/AppImageKit-checkrt for details
mkdir -p appdir/usr/optional/ ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./appdir/usr/optional/exec.so
mkdir -p appdir/usr/optional/libstdc++/ ; cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/
( cd appdir ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O AppRun ; chmod a+x AppRun)
find appdir/
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh TreeSheets*.AppImage*
fi