-
Notifications
You must be signed in to change notification settings - Fork 69
/
.travis.yml
83 lines (70 loc) · 3.44 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
language: cpp
sudo: required
dist: trusty
branches:
only:
- master
- /^\d+\.\d+\.\d+(\.\d+)?$/
env:
global:
- CONFIG=Release
- MIDIEDITOR_RELEASE_VERSION_ID=3
- MIDIEDITOR_RELEASE_VERSION_STRING=$TRAVIS_TAG
- MIDIEDITOR_PACKAGE_VERSION=1
- INSTALLJAMMER=installjammer/installjammer
matrix:
include:
- os: linux
env: BUILD_OS=LINUX MIDIEDITOR_BINARY=MidiEditor
- os: linux
env: BUILD_OS=WINDOWS MXE=/usr/lib/mxe/ PATH=$MXE/usr/bin:$PATH MIDIEDITOR_BINARY_WINDOWS=windows32_build/.build/bin/MidiEditor.exe
- os: osx
env: BUILD_OS=MAC MIDIEDITOR_BINARY=MidiEditor.app
before_install:
- if [ "$BUILD_OS" = "LINUX" ]; then sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sudo apt-get update -qq; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sudo apt-get install qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sudo apt-get install qt5-default qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5 libqt5multimedia5-plugins; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sudo apt-get install libasound2-dev; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sudo apt-get install fakeroot; fi
- QT_VERSION_MM=59
- QT_VERSION_FULL=591-trusty
# For mxe.cc (see http://mxe.cc/#requirements)
- if [ "$BUILD_OS" = "WINDOWS" ]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then sudo add-apt-repository 'deb [arch=amd64] http://mirror.mxe.cc/repos/apt trusty main'; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then sudo apt-get update; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then sudo apt-get install mxe-i686-w64-mingw32.static-qtbase mxe-i686-w64-mingw32.static-qtmultimedia; fi
- if [ "$BUILD_OS" = "MAC" ]; then brew install qt5; fi
- if [ "$BUILD_OS" = "MAC" ]; then brew link qt5 --force; fi
before_script:
script:
- if [ "$BUILD_OS" = "WINDOWS" ]; then sh building/build-windows.sh; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sh building/build-linux.sh; fi
- if [ "$BUILD_OS" = "MAC" ]; then sh building/build-mac.sh; fi
before_deploy:
- if [ "$BUILD_OS" = "WINDOWS" ]; then git clone https://github.com/damoncourtney/installjammer.git installjammer; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then cd installjammer; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then git tag -l; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then git checkout tags/v1.2.14; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then cd ../; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then sh packaging/windows/create_windows_setup.sh; fi
- if [ "$BUILD_OS" = "WINDOWS" ]; then DEPLOY_BINARIY=releases/MidiEditor-$MIDIEDITOR_RELEASE_VERSION_STRING-Setup.exe; fi
- if [ "$BUILD_OS" = "LINUX" ]; then sh packaging/unix/build_deb.sh; fi
- if [ "$BUILD_OS" = "LINUX" ]; then DEPLOY_BINARIY=releases/midieditor_$MIDIEDITOR_RELEASE_VERSION_STRING-$MIDIEDITOR_PACKAGE_VERSION-amd64.deb; fi
- if [ "$BUILD_OS" = "MAC" ]; then DEPLOY_BINARIY=releases/MidiEditor-$MIDIEDITOR_RELEASE_VERSION_STRING-mac.tar.gz; fi
- if [ "$BUILD_OS" = "MAC" ]; then tar cvzf $DEPLOY_BINARIY $MIDIEDITOR_BINARY; fi
deploy:
provider: releases
prerelease: true
skip-cleanup: true
api_key: $GITHUB_TOKEN
keep-history: true
on:
tags: true
file: $DEPLOY_BINARIY
notifications:
email:
recipients:
on_success: always
on_failure: always