forked from IJHack/QtPass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (84 loc) · 4.46 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
language: cpp
dist: bionic
sudo: true
os:
- linux
- osx
compiler:
- gcc
- clang
env:
global:
secure: WaZq3f6KIAc0dnR4WOXYWDvUYiqlrzsZC/PQse47FnvC0oQC65J5w3kJOj/P26DgsUEqKQF3ukXogkM2mp5pS4+CMgivEmQmAbgQTtwcKpC5HPZxgI+8FgkCjcalJKWGWYoxlScNVNiKMs+89ApcSQE9kH9PZeUS9dukN2Php1U=
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:beineri/opt-qt-5.12.3-bionic; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
addons:
coverity_scan:
project:
name: IJHack/qtpass
description: Build submitted via Travis CI
notification_email: [email protected]
build_command_prepend: qmake; make clean
build_command: make
branch_pattern: coverity_scan
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew unlink node; brew install node; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew upgrade coreutils; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH=$PATH:/usr/local/opt/qt5/bin; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install pandoc; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then nvm install 12; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then nvm use 12; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then npm install -g appdmg; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install qt512base qt512tools qt512svg libgl1-mesa-dev; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" && "$CC" = "gcc" ]]; then sudo apt-get -qq install g++-6 gcc-6; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" && "$CC" = "gcc" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6; fi
- if [[ "$TRAVIS_OS_NAME" = "linux" && "$CC" = "gcc" ]]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-6 90; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then npm install -g codecov; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then gem install coveralls-lcov; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install lcov; fi
before_script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then source /opt/qt512/bin/qt512-env.sh; fi
- "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | sudo bash"
- qmake -v
script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then qmake CONFIG+=coverage -Wall qtpass.pro; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make -j$(nproc); fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make -j$(nproc) coveralls TESTARGS="--platform offscreen"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make distclean; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then qmake CONFIG+=coverage -Wall qtpass.pro; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make -j$(nproc); fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make -j$(nproc) codecov TESTARGS="--platform offscreen"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make distclean; fi
- qmake -Wall qtpass.pro
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then lrelease localization/localization_*; fi
- make -j$(nproc)
- make check TESTARGS="--platform offscreen"
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then macdeployqt main/QtPass.app; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed 's/FAQ\.md/https:\/\/qtpass.org\/docs\/md_FAQ.html/' < README.md > README.faq; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed 's/CONTRIBUTING\.md/https:\/\/qtpass.org\/docs\/md_CONTRIBUTING.html/' < README.faq > README.contrib; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed 's/\[\!.*//' < README.contrib > README.clean; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then pandoc --standalone --from=gfm --to=rtf --output=README.rtf README.clean; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then appdmg appdmg.json qtpass-$(grep ^VERSION qtpass.pri | cut -d " " -f 6).dmg; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export VERSION=$(grep ^VERSION qtpass.pri | cut -d " " -f 6); fi
- fossa init
- fossa init
notifications:
irc:
channels:
- chat.freenode.net#IJhack
on_success: change
on_failure: always
deploy:
provider: releases
api_key:
secure: O6LAl2R5QIe/mgQwG5/pzbdC8gS58wtGVF2ebTVGgYsCgY0nRjLZ19H7BiQrYjbbXs8yw6cQjA+xbxNiVsIVs+Dx9j/fy2JOBeBTrGijlWLcJPT6/Ab65EjI2T96XvI8/YejRmbgjIdXFfuKtD/V4MM12LrvrvktwJp00G9l1Go=
file: "qtpass-$VERSION.dmg"
on:
repo: IJHack/qtpass
tags: true
condition: $TRAVIS_OS_NAME = osx && $CC = clang
skip_cleanup: true