This repository has been archived by the owner on Sep 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
97 lines (94 loc) · 4.17 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
language: cpp
matrix:
include:
- os: windows
env:
- PATH=/c/Qt/5.14.2/mingw73_64/bin:/c/Qt/Tools/mingw730_64/bin:/c/Python/:/c/Python/Scripts:$PATH
- BUILD_DIR=build
- BOOST_ROOT=/c/Boost/
before_install:
- wget -q https://download.qt.io/official_releases/qt/5.14/5.14.2/qt-opensource-windows-x86-5.14.2.exe
- choco install python2 --params="/InstallDir:C:\Python"
- python.exe -m pip install --upgrade pip
- python.exe -m pip install requests
install:
- ./qt-opensource-windows-x86-5.14.2.exe --script ./scripts/qt_windows_installer.qs
- python.exe ./scripts/install_env.py
#- wget -q https://www.sqlite.org/2020/sqlite-amalgamation-3320300.zip
#- 7z.exe e sqlite-amalgamation-3320300.zip -oc:\sqlite\include
#- wget -q https://www.sqlite.org/2020/sqlite-dll-win64-x64-3320300.zip
#- 7z.exe e sqlite-dll-win64-x64-3320300.zip -oc:\sqlite\lib
- choco install doxygen.install
- choco install graphviz
cache:
directories:
- boost_1_73_0/
script:
- mkdir ${BUILD_DIR} && cd ${BUILD_DIR}
- cmake .. -G "MinGW Makefiles"
- mingw32-make
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- graphviz
- doxygen
- sqlite3 libsqlite3-dev
- qt5-default
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- BUILD_DIR=build
- PROJECT_NAME=AppChat
before_install:
- eval "${MATRIX_EVAL}"
before_script:
- sudo python3 ./scripts/install_env.py
- sudo apt-get install libprotobuf-dev protobuf-compiler
cache:
directories:
- boost_1_73_0/
script:
- mkdir ${BUILD_DIR}
- cd ${BUILD_DIR}
- cmake ..
- cmake --build .
- cmake --build . --target test
- cmake --build . --target package
# after_success:
# - cd ${TRAVIS_BUILD_DIR}/${BUILD_DIR}/bin/release
# - tar -cf AppChat-0.7.$TRAVIS_BUILD_NUMBER-Linux.tar appchat-server appchat-client
deploy:
provider: script
skip_cleanup: true
on:
branch: master
script:
- curl -T ${TRAVIS_BUILD_DIR}/${BUILD_DIR}/${PROJECT_NAME}-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb -uk-morozov:$BINTRAY_API_KEY "https://api.bintray.com/content/k-morozov/${PROJECT_NAME}/linux/0.7.$TRAVIS_BUILD_NUMBER/${PROJECT_NAME}-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb;deb_distribution=bionic;deb_component=main;deb_architecture=amd64;publish=1" && ls
# - >-
# if [[ "$TRAVIS_BRANCH" = "dev" && -n "$TRAVIS_BUILD_DOCS" ]] ; then
# cd $TRAVIS_BUILD_DIR
# echo 'Generating Doxygen code documentation...'
# # Redirect both stderr and stdout to the log file AND the console.
# doxygen doc/Doxyfile 2>&1 | tee doxygen.log
# curl -T ${TRAVIS_BUILD_DIR}/${BUILD_DIR}/appchat-server-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb -uk-morozov:$BINTRAY_API_KEY "https://api.bintray.com/content/k-morozov/AppChat/server/server-linux/appchat-server-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb;deb_distribution=bionic;deb_component=main;deb_architecture=amd64;publish=1"
# curl -T ${TRAVIS_BUILD_DIR}/${BUILD_DIR}/appchat-client-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb -uk-morozov:$BINTRAY_API_KEY "https://api.bintray.com/content/k-morozov/AppChat/client/client-linux/appchat-client-0.7.$TRAVIS_BUILD_NUMBER-Linux.deb;deb_distribution=bionic;deb_component=main;deb_architecture=amd64;publish=1"
# fi
# before_deploy:
# - git config --local user.name "k-morozov"
# - git config --local user.email "morozov-kst@yandex.ru"
# - git tag 0.7.$TRAVIS_BUILD_NUMBER-Linux
# deploy:
# - provider: releases
# api_key: $GITHUB_API_KEY
# file: AppChat-0.7.$TRAVIS_BUILD_NUMBER-Linux.tar
# skip_cleanup: true
# on:
# branch: release
# - provider: pages
# skip_cleanup: true
# token: $GITHUB_API_KEY
# keep_history: true
# local_dir: docs/html