-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
96 lines (82 loc) · 4.87 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
notifications:
email: false
language: cpp
sudo: false
# if pull request: always build
# if push: only build for master branch
if: (type != push) OR (type = push AND branch = master)
matrix:
include:
- os: osx
env:
- BUILD_FOLDER="MacOSX"
- PROJUCER="$TRAVIS_BUILD_DIR/JUCE/extras/Projucer/Builds/MacOSX/build/Debug/Projucer.app/Contents/MacOS/Projucer"
- secure: rufS7Oae56diLomkcsVYEvg3GKLh+YuiNy7YPKfcLDPIfqrUmWyo56vOjHkL+fGM+pPvA8UoOjJf7128aaN5N8nsFdAQr2Gq4TbyyE9V/IxlH7ib9dcBdqJRcCwuRgOhWhwGm4AlRX21+bJWGZYi2n0QKn6Ri2I3dWoFb/UIfQXRDo8MtFxnd7S1HD6iPRHGDvGWRxi2AvUKI6W8ed+L/nNS8EsH73vJJ819P0HpUAJDzW8fc7KbQoZOryTdLCiASyxSw0AYGYeVxvcnJe0T4zOHdGhj9d1xBVMphR/y2tuiCWBFEB56VvPYC/51Jt/bddfsoTbkC7ZRmlc7aWcKmCAf+JN9G9outRuoPZRk+P+koVnTaflmJJaaS0UEiXFTzik6q942RiSSrLLf+tN6k2rwDFDSYJ2vdrdsVzwSI6CZ2leXsMQqERwM+L/eOtYnidGosNyyxD6THObmowwtgMi1d3optu0K6DOUbxizvWGiun8u2r8P0W/0JxW8JkRHoOJmeM1j9B24QdV7IgI7lesUkijy2Ei4Vvtff/OW1roPr6zevL48ciTx8qG1HA/EjzkRfAjLhDXczvdjRLERbbn+IhQ4WqiiamZ0TvyYBKJbYOehQwd4bk0eYm7UZld/v4LFlWeT1DmBpZsEsGza4+WROJQfSnG3d7aiqM0zBVs=
- os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- BUILD_FOLDER="VisualStudio2017"
- PROJUCER="$TRAVIS_BUILD_DIR/JUCE/extras/Projucer/Builds/VisualStudio2017/x64/Debug/App/Projucer.exe"
before_install:
# mac installs
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then gem install xcpretty; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then gem install xcpretty-travis-formatter; fi
# windows setup msbuild path
- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then export PATH=$MSBUILD_PATH:$PATH; fi
#Build Projucer
- cd $TRAVIS_BUILD_DIR/JUCE/extras/Projucer/Builds/$BUILD_FOLDER
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then xcodebuild -project Projucer.xcodeproj > /dev/null; fi
- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then msbuild.exe -v:normal Projucer.sln; fi
script:
- cd $TRAVIS_BUILD_DIR/
- $PROJUCER --set-global-search-path $TRAVIS_OS_NAME defaultJuceModulePath $TRAVIS_BUILD_DIR/JUCE/modules
- $PROJUCER --set-global-search-path $TRAVIS_OS_NAME vstLegacyPath $TRAVIS_BUILD_DIR/JUCE/VST2_SDK
- $PROJUCER --resave CHOW.jucer
- cd $TRAVIS_BUILD_DIR/Builds/$BUILD_FOLDER/
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then xcodebuild -project CHOW.xcodeproj/ clean; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then xcodebuild -project CHOW.xcodeproj/ -configuration Release | xcpretty -s -f `xcpretty-travis-formatter`; fi
- if [[ $TRAVIS_OS_NAME == 'windows' ]]; then msbuild.exe -v:normal CHOW.sln; fi
- echo "SUCCESS"
after_success:
- |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
echo "Validating plugin"
cd $TRAVIS_BUILD_DIR/
curl -L "https://github.com/Tracktion/pluginval/releases/download/latest_release/pluginval_macOS.zip" -o pluginval.zip
unzip pluginval
pluginval.app/Contents/MacOS/pluginval --strictness-level 8 --validate-in-process --validate "$TRAVIS_BUILD_DIR/Builds/MacOSX/build/Release/CHOW.vst3" || exit 1
pluginval.app/Contents/MacOS/pluginval --strictness-level 8 --validate-in-process --validate "$TRAVIS_BUILD_DIR/Builds/MacOSX/build/Release/CHOW.component" || exit 1
fi
- |
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
echo "Validating plugin"
cd $TRAVIS_BUILD_DIR/
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest https://github.com/Tracktion/pluginval/releases/download/latest_release/pluginval_Windows.zip -OutFile pluginval.zip"
powershell -Command "Expand-Archive pluginval.zip -DestinationPath ."
./pluginval.exe --strictness-level 8 --validate-in-process --validate "$TRAVIS_BUILD_DIR/Builds/VisualStudio2017/x64/Debug/VST3/CHOW.vst3"
fi
after_success: # upload mac bins
- |
if [[ $TRAVIS_OS_NAME == 'osx' && type != push ]]; then
echo "Copying Files..."
cd $TRAVIS_BUILD_DIR/Bin/Mac
rm travis_builds.zip
mkdir travis_builds
cp -R $TRAVIS_BUILD_DIR/Builds/MacOSX/build/Release/CHOW.app $TRAVIS_BUILD_DIR/Bin/Mac/travis_builds/CHOW.app
cp -R /Users/travis/Library/Audio/Plug-Ins/Components/CHOW.component $TRAVIS_BUILD_DIR/Bin/Mac/travis_builds/CHOW.component
cp -R /Users/travis/Library/Audio/Plug-Ins/VST/CHOW.vst $TRAVIS_BUILD_DIR/Bin/Mac/travis_builds/CHOW.vst
cp -R /Users/travis/Library/Audio/Plug-Ins/VST3/CHOW.vst3 $TRAVIS_BUILD_DIR/Bin/Mac/travis_builds/CHOW.vst3
zip -r travis_builds.zip travis_builds
echo "Setting Up Git..."
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
echo "Committing Files..."
cd $TRAVIS_BUILD_DIR/
git checkout -b mac
git add Bin/Mac/travis_builds.zip
git commit -m "Travis build- $TRAVIS_BUILD_NUMBER"
echo "Pushing to branch..."
git push https://${GH_TOKEN}@github.com/jatinchowdhury18/CHOW.git -f
fi
env:
global: