forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
157 lines (128 loc) · 4.04 KB
/
azure-pipelines.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Surge synth build script
# https://aka.ms/yaml
trigger:
- master
- releases/*
pr:
- master
jobs:
- job: Build
strategy:
matrix:
mac:
imageName: 'macos-10.13'
isMac: true
windows:
imageName: 'vs2017-win2016'
isWindows: true
linux:
imageName: 'ubuntu-16.04'
isLinux: true
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
# submodules: recursive # can't do submodules here b'cuz depth=1 fails with Github
- bash: |
# do this here, because we're using a shallow clone and it fails using `submodules: recursive` above
git submodule update --init --recursive
export SURGE_VERSION=$(cat VERSION)
echo "SURGE_VERSION=$SURGE_VERSION"
echo "##vso[task.setvariable variable=SURGE_VERSION]$SURGE_VERSION"
displayName: Submodule init
- bash: |
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_MAC=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-macosx.tar.gz
curl -L $PREMAKE_MAC --output premake5.tar.gz
tar zxvf premake5.tar.gz
popd
export PATH=$AGENT_TEMPDIRECTORY:$PATH
./build-osx.sh --build --verbose
ls -alFh target
ls -alFh products
condition: variables.isMac
displayName: Build macOS releases
- task: NuGetToolInstaller@0
condition: variables.isWindows
displayName: NuGet
- bash: |
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_WINDOWS=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-windows.zip
curl -L $PREMAKE_WINDOWS --output premake5.zip
unzip premake5.zip
popd
export PATH=$AGENT_TEMPDIRECTORY:$PATH
premake5 vs2017
ls -alFh
# need this because MSBuild.restoreNugetPackages: true fails
nuget restore .
condition: variables.isWindows
displayName: Setup Windows Project
- task: MSBuild@1
inputs:
solution: 'buildtask.xml'
maximumCpuCount: true
# restoreNugetPackages: true
condition: variables.isWindows
displayName: Build Windows
- bash: |
set -x
pushd $AGENT_TEMPDIRECTORY
export PREMAKE_LINUX=https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-linux.tar.gz
curl -L $PREMAKE_LINUX --output premake5.tar.gz
tar zxvf premake5.tar.gz
export PATH=$AGENT_TEMPDIRECTORY:$PATH
popd
sudo apt-get install -y libgtkmm-3.0-dev
sudo apt-get install -y xcb
sudo apt-get install -y libxcb-util-dev
sudo apt-get install -y libxcb-cursor-dev
sudo apt-get install -y libxcb-keysyms1-dev
sudo apt-get install -y libxkbcommon-dev
sudo apt-get install -y libxkbcommon-x11-dev
./build-linux.sh --build
find . -name '*'
condition: variables.isLinux
displayName: Build Linux
- bash: |
nuget install chocolatey
choco install innosetup version=5.6.1 -y
iscc installer_win/surge.iss
condition: variables.isWindows
displayName: Make Windows installer
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'INSTALLER_WIN_EXE'
targetPath: 'installer_win/Output'
condition: variables.isWindows
displayName: Publish Windows installer
- bash: |
echo "SURGE_VERSION=$SURGE_VERSION"
pushd installer_mac
./make_installer.sh "" --dmg
rm *.pkg
popd
condition: variables.isMac
displayName: Make macOS installer
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'INSTALLER_MAC_DMG'
targetPath: 'installer_mac'
condition: variables.isMac
displayName: Publish macOS DMG
- job: NotifyReleases
dependsOn: Build
condition: succeeded()
steps:
- checkout: none
- task: DownloadSecureFile@1
inputs:
secureFile: notify-releases.sh
- bash: |
if ! [[ $BUILD_SOURCEBRANCHNAME =~ ^(master|release/.+)$ ]]; then
exit
fi
echo "Notifying releases..."
bash $AGENT_TEMPDIRECTORY/notify-releases.sh
displayName: Notify Releases