forked from aardappel/treesheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
100 lines (90 loc) · 3.53 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
# 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 --disable-sys-libs --with-osx_cocoa --without-libtiff CXXFLAGS="-stdlib=libc++" LDFLAGS="-stdlib=libc++" OBJCXXFLAGS="-stdlib=libc++" 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 -S . -C _build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make -C _build -j$(nproc)
make -C _build 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
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