forked from surge-synthesizer/surge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
110 lines (91 loc) · 2.82 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
# 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
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: |
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