forked from nuttyartist/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (100 loc) · 6.86 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
sudo: required
dist: trusty
language: cpp
env:
- QT_BASE=55
- QT_BASE=56
- QT_BASE=57
- QT_BASE=58
- QT_BASE=trusty
- QT_BASE=xenial
- QT_BASE=yakkety
- QT_BASE=zesty
- QT_BASE=appimage
- QT_BASE=snap
service:
- docker
before_install:
- git fetch --unshallow
- if [ "$QT_BASE" = "55" ]; then sudo add-apt-repository ppa:beineri/opt-qt551-trusty -y; fi
- if [ "$QT_BASE" = "56" ]; then sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y; fi
- if [ "$QT_BASE" = "57" ]; then sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y; fi
- if [ "$QT_BASE" = "58" ]; then sudo add-apt-repository ppa:beineri/opt-qt58-trusty -y; fi
- if [ "$QT_BASE" = "xenial" ]; then docker pull theshadowx/qt5:default_qt5_xenial; fi
- if [ "$QT_BASE" = "yakkety" ]; then docker pull theshadowx/qt5:default_qt5_yakkety; fi
- if [ "$QT_BASE" = "zesty" ]; then docker pull theshadowx/qt5:default_qt5_zesty; fi
- if [ "$QT_BASE" = "appimage" ]; then docker pull theshadowx/docker-snapcraft-qt:qt55; fi
- sudo apt-get update -qq
install:
- sudo apt-get -y install software-properties-common checkinstall xvfb dh-make fakeroot gpgv2 tree
- if [ "$QT_BASE" == "55" ]; then sudo apt-get install -qq qt55base; source /opt/qt55/bin/qt55-env.sh; fi
- if [ "$QT_BASE" == "56" ]; then sudo apt-get install -qq qt56base; source /opt/qt56/bin/qt56-env.sh; fi
- if [ "$QT_BASE" == "57" ]; then sudo apt-get install -qq qt57base; source /opt/qt57/bin/qt57-env.sh; fi
- if [ "$QT_BASE" == "58" ]; then sudo apt-get install -qq qt58base; source /opt/qt58/bin/qt58-env.sh; fi
- if [ "$QT_BASE" == "trusty" ]; then sudo apt-get install -y qt5-default qtbase5-private-dev; fi
before_script:
- echo "$QT_BASE:$TRAVIS_BRANCH----------------------------------------------------------------------------------------------"
- if [ "$QT_BASE" == "55" ]; then qmake -v; fi
- if [ "$QT_BASE" == "56" ]; then qmake -v; fi
- if [ "$QT_BASE" == "57" ]; then qmake -v; fi
- if [ "$QT_BASE" == "58" ]; then qmake -v; fi
- if [ "$QT_BASE" == "trusty" ]; then qmake -v; fi
- if [ "$QT_BASE" == "xenial" ]; then docker run --rm -it theshadowx/qt5:default_qt5_xenial qmake -v; fi
- if [ "$QT_BASE" == "yakkety" ]; then docker run --rm -it theshadowx/qt5:default_qt5_yakkety qmake -v; fi
- if [ "$QT_BASE" == "zesty" ]; then docker run --rm -it theshadowx/qt5:default_qt5_zesty qmake -v; fi
- mkdir build;
- cd build;
script:
- if [ "$QT_BASE" == "xenial" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial make deb;
elif [ "$QT_BASE" == "yakkety" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_yakkety qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_yakkety make deb;
elif [ "$QT_BASE" == "zesty" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_zesty qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_zesty make deb;
elif [ "$QT_BASE" == "snap" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial qmake ../src/;
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial make snap;
elif [ "$QT_BASE" == "appimage" ]; then
docker run --rm -it -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial qmake ../src/;
docker run --rm -it --privileged -v ${TRAVIS_BUILD_DIR}:/home/root/notes -w=/home/root/notes/build theshadowx/qt5:default_qt5_xenial make appimage;
else
qmake ../src;
make -j4;
echo "-----------------------------------------------";
make deb;
fi
after_success:
- if [ "$TRAVIS_BRANCH" != "master" ]; then
if [ "$QT_BASE" == "trusty" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64-$QT_BASE.deb ;
elif [ "$QT_BASE" == "xenial" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64-$QT_BASE.deb ;
elif [ "$QT_BASE" == "yakkety" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64-$QT_BASE.deb ;
elif [ "$QT_BASE" == "zesty" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64-$QT_BASE.deb ;
elif [ "$QT_BASE" == "appimage" ]; then
curl --upload-file ./Notes-*.AppImage https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64.AppImage;
elif [ "$QT_BASE" == "snap" ]; then
curl --upload-file snap/notes*.snap https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')-git$(git rev-parse --short HEAD)_amd64-xenial.snap ;
fi
else
if [ "$QT_BASE" == "trusty" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64-trusty.deb ;
elif [ "$QT_BASE" == "xenial" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64-xenial.deb ;
elif [ "$QT_BASE" == "yakkety" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64-yakkety.deb ;
elif [ "$QT_BASE" == "zesty" ]; then
curl --upload-file deb/notes*.deb https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64-zesty.deb ;
elif [ "$QT_BASE" == "appimage" ]; then
curl --upload-file ./Notes-*.AppImage https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64.AppImage;
elif [ "$QT_BASE" == "snap" ]; then
curl --upload-file snap/notes*.snap https://transfer.sh/notes_$(git describe --always --tags HEAD | cut -d- -f1 | sed 's/^v//')_amd64.snap ;
fi
fi
notifications:
email: false