-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
141 lines (120 loc) · 4.76 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
language: cpp
git:
depth: 1
notifications:
email: false
matrix:
matrix:
include:
- os: osx
osx_image: xcode10.1
compiler: clang
env: BUILD_FOLDER=MacOSX_CI
- os: linux
arch: amd64
dist: bionic
sudo: required
env: TARGET_SYSTEM=linux-x64 BUILD_FOLDER=LinuxMakefile
- os: linux
arch: amd64
dist: bionic
sudo: required
env: TARGET_SYSTEM=linux-armhf BUILD_FOLDER=Raspberry
before_install:
- |
if [ -n "$TRAVIS_TAG" ]; then
if [ "$TRAVIS_TAG" == *b* ]; then
echo "Beta version, set config to Release"
export MAKECONF=Release
export SUFFIX=$TRAVIS_TAG
else
echo "Stable version, set config to Release"
export MAKECONF=Release
export SUFFIX=$TRAVIS_TAG
fi
else
echo "No tag set, set config to Debug / bleeding"
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export MAKECONF=Release
else
export MAKECONF=Release
fi
export SUFFIX=bleedingedge
fi;
echo "Suffix : $SUFFIX"
echo "Target system : $TARGET_SYSTEM"
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ $TARGET_SYSTEM == "linux-armhf" ]; then
echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main universe' >> /etc/apt/sources.list
echo 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-updates main universe' >> /etc/apt/sources.list
sudo dpkg --add-architecture armhf
sudo apt-get update
echo "Installing armhf cross compilation tools"
sudo apt-get install -q g++-arm-linux-gnueabihf
echo "Installing extra lib dependencies"
sudo apt-get install -q libgdk-pixbuf2.0-dev:armhf libpango1.0-dev:armhf libsoup2.4-dev:armhf libharfbuzz-dev:armhf libxml2-dev:armhf libicu-dev:armhf libc6-dev:armhf libxft-dev:armhf
echo "Downloading AppImage runtime for armhf"
cd $HOME
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-armhf"
export APPIMAGE_RUNTIME="--runtime-file $HOME/runtime-armhf"
export CXX=arm-linux-gnueabihf-g++
export CC=arm-linux-gnueabihf-gcc
export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig
# TARGET_ARCH is used in the Makefile
export TARGET_ARCH="-march=armv8-a"
# DEP_ARCH is used later when downloading the dependencies
export DEP_ARCH="armhf"
fi
sudo apt-get update
echo "Installing JUCE lib dependencies and extra tools"
sudo apt-get install -q libfreetype6-dev:$DEP_ARCH libx11-dev:$DEP_ARCH libxinerama-dev:$DEP_ARCH libxrandr-dev:$DEP_ARCH libxcursor-dev:$DEP_ARCH libxcomposite-dev:$DEP_ARCH mesa-common-dev:$DEP_ARCH libasound2-dev:$DEP_ARCH freeglut3-dev:$DEP_ARCH libcurl4-gnutls-dev:$DEP_ARCH libasound2-dev:$DEP_ARCH libjack-dev:$DEP_ARCH libbluetooth-dev:$DEP_ARCH libgtk-3-dev:$DEP_ARCH libwebkit2gtk-4.0-dev:$DEP_ARCH libsdl2-dev:$DEP_ARCH libfuse2:$DEP_ARCH libusb-1.0-0-dev:$DEP_ARCH libhidapi-dev:$DEP_ARCH
sudo apt-get install -q curl
echo 'GCC Version:'
$CC -v
echo 'Downloading AppImageTool...'
cd $HOME
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
else
gem install xcpretty
gem install xcpretty-travis-formatter
cd $HOME
curl -L -o Packages.dmg 'http://s.sudre.free.fr/Software/files/Packages.dmg'
hdiutil mount Packages.dmg
sudo installer -pkg /Volumes/Packages\ $PACKAGES_VERSION/Install\ Packages.pkg -target /
hdiutil detach /Volumes/Packages\ $PACKAGES_VERSION/
fi
install:
- |
cd $HOME
git clone --depth=1 --branch=develop-local https://github.com/benkuper/JUCE.git JUCE
cd $TRAVIS_BUILD_DIR/..
mkdir "JUCE Modules"
cd "JUCE Modules"
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
cd $TRAVIS_BUILD_DIR/Builds/$BUILD_FOLDER
make -j2 CONFIG=$MAKECONF
else
cd $TRAVIS_BUILD_DIR
xcodebuild -project Builds/$BUILD_FOLDER/BenTo.xcodeproj -configuration $MAKECONF -jobs 2 -verbose | xcpretty -f `xcpretty-travis-formatter`
fi
after_success:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
cd $TRAVIS_BUILD_DIR/Builds/$BUILD_FOLDER
echo 'Packaging AppImage...'
mkdir BenTo.AppDir/usr/bin/
cp build/BenTo BenTo.AppDir/usr/bin/
$HOME/appimagetool-x86_64.AppImage $APPIMAGE_RUNTIME BenTo.AppDir BenTo-$TARGET_SYSTEM-$SUFFIX.AppImage
echo 'Uploading $SUFFIX ...'
curl -X POST -F "appFile=@BenTo-$TARGET_SYSTEM-$SUFFIX.AppImage" -F "pass=$UPLOAD_PASS" -F "path=download/" $UPLOAD_URL
else
cd $TRAVIS_BUILD_DIR/Package
ls
packagesbuild BenTo.pkgproj
mv BenTo.pkg BenTo-osx-$SUFFIX.pkg
echo 'Uploading $SUFFIX ...'
curl -X POST -F "appFile=@BenTo-osx-$SUFFIX.pkg" -F "pass=$UPLOAD_PASS" -F "path=download/" $UPLOAD_URL
fi