forked from baumgarr/nixnote2
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
72 lines (67 loc) · 3.2 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
language: cpp
compiler: gcc
sudo: require
dist: focal
before_install:
- sudo apt-get update -qq
install:
- |
sudo apt-get -y install git-core qt5-default build-essential \
wget curl make pkg-config \
libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev libcurl4-openssl-dev \
libpoppler-qt5-dev libqt5webkit5-dev qt5-qmake qttools5-dev-tools libqt5sql5-sqlite \
libhunspell-dev libtidy-dev libqt5positioning5-plugins
script:
- echo qmake CONFIG+=release PREFIX=/usr
- |
qmake CONFIG+=release PREFIX=/usr &&
ls -l ./development &&
make -j$(nproc) &&
make INSTALL_ROOT=appdir -j$(nproc) install &&
find appdir/ &&
qmake testsrc/tests.pro CONFIG+=release PREFIX=/usr &&
make &&
./qmake-build-release-t/tests -platform offscreen
- |
wget -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" && \
chmod a+x ./linuxdeploy-x86_64.AppImage && \
./linuxdeploy-x86_64.AppImage --appimage-extract && \
mv squashfs-root linuxdeploy && \
mv linuxdeploy/AppRun linuxdeploy/linuxdeploy
- |
wget -nv "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" && \
chmod a+x ./linuxdeploy-plugin-qt-x86_64.AppImage && \
./linuxdeploy-plugin-qt-x86_64.AppImage --appimage-extract && \
mv squashfs-root linuxdeploy-plugin-qt && \
mv linuxdeploy-plugin-qt/AppRun linuxdeploy-plugin-qt/linuxdeploy-plugin-qt
- |
wget -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage" && \
chmod a+x appimagetool-x86_64.AppImage && \
./appimagetool-x86_64.AppImage --appimage-extract && \
mv squashfs-root appimagetool && \
mv appimagetool/AppRun appimagetool/appimagetool
- export PATH=linuxdeploy:linuxdeploy-plugin-qt:appimagetool:$PATH
- linuxdeploy --desktop-file=./appdir/usr/share/applications/nixnote2.desktop --appdir=appdir --plugin qt
- rm -f appdir/usr/lib/libnss3.so
- rm -f appdir/usr/lib/libnssutil3.so
- appimagetool -n appdir
after_success:
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- #wget -c https://raw.githubusercontent.com/robert7/uploadtool/temp/upload.sh
- |
if [ "$TRAVIS_BRANCH" == "master" ] || [ "$TRAVIS_BRANCH" == "develop" ]; then
echo "We are building master or develop => upload"
if [ "$TRAVIS_BRANCH" != "master" ] ; then
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
fi
RELEASE_NOTES=$(cat ./development/release-notes/release-$TRAVIS_BRANCH.md)
export VERSION=$(cat appdir/usr/share/nixnote2/version.txt)
export UPLOADTOOL_BODY="$RELEASE_NOTES - Version: **${VERSION}** - [Travis CI build log](https://travis-ci.com/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/)."
#mv debian/changelog debian/changelog.txt
bash upload.sh NixNote*.AppImage || exit 1
fi
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- # Do not build feature branches
- /^(?i:continuous|feature)/