forked from stoermelder/vcvrack-packtau
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
161 lines (137 loc) · 4.41 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
157
158
159
160
161
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- v2
pr:
- v2
jobs:
- job: Build
strategy:
matrix:
mac:
imageName: 'macos-10.15'
isMac: true
windows:
imageName: 'windows-2019'
isWindows: true
linux:
imageName: 'ubuntu-18.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: |
uname -a
git submodule update --init --recursive
pushd $AGENT_TEMPDIRECTORY
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-2.0.6-win.zip
unzip Rack-SDK.zip
displayName: Get Rack
condition: variables.isWindows
- bash: |
uname -a
git submodule update --init --recursive
pushd $AGENT_TEMPDIRECTORY
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-2.0.6-mac.zip
unzip Rack-SDK.zip
displayName: Get Mac Rack-SDK
condition: variables.isMac
- bash: |
uname -a
git submodule update --init --recursive
pushd $AGENT_TEMPDIRECTORY
curl -o Rack-SDK.zip https://vcvrack.com/downloads/Rack-SDK-2.0.6-lin.zip
unzip Rack-SDK.zip
displayName: Get Linux Rack-SDK
condition: variables.isLinux
- bash: |
chmod +x scripts/resetversion.sh
./scripts/resetversion.sh
displayName: Update Version in plugins.json
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
export CC=gcc
make win-dist
mkdir products_win/
cp dist/*vcvplugin products_win/
displayName: Build Windows Plugins
condition: variables.isWindows
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
make dist
mkdir products_mac/
cp dist/*vcvplugin products_mac/
displayName: Build Mac Plugins
condition: variables.isMac
- bash: |
export RACK_DIR=$AGENT_TEMPDIRECTORY/Rack-SDK
sudo apt-get update
sudo apt-get install libglu-dev --fix-missing
make dist
mkdir products_lin/
cp dist/*vcvplugin products_lin/
displayName: Build Linux Plugins
condition: variables.isLinux
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_LINUX'
targetPath: 'products_lin/'
displayName: Publish Linux vcvplugin
condition: variables.isLinux
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_MACOS'
targetPath: 'products_mac/'
displayName: Publish macOS vcvplugin
condition: variables.isMac
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_WIN'
targetPath: 'products_win/'
displayName: Publish Windows vcvplugin
condition: variables.isWindows
- job: UpdateGithubRelease
dependsOn: Build
condition: and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/v2'), eq(variables['Build.SourceBranch'], 'refs/heads/azure-test')))
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_LINUX'
targetPath: $(Build.ArtifactStagingDirectory)
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_MACOS'
targetPath: $(Build.ArtifactStagingDirectory)
- task: DownloadPipelineArtifact@0
inputs:
artifactName: 'PACKTAU_ZIP_WIN'
targetPath: $(Build.ArtifactStagingDirectory)
- bash: |
ls -l $(Build.ArtifactStagingDirectory)
export EXTEND_TAG=`date "+%Y%m%d"`
for file in $(Build.ArtifactStagingDirectory)/*.vcvplugin; do mv "$file" "${file/.vcvplugin/-${EXTEND_TAG}.vcvplugin}"; done
ls -l $(Build.ArtifactStagingDirectory)
displayName: Tag asset names with Date
- bash: |
chmod +x scripts/release-notes.sh
scripts/release-notes.sh > $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
displayName: Fake up release notes
- task: GitHubRelease@0
displayName: "Update Github Release"
inputs:
gitHubConnection: stoermelder
repositoryName: stoermelder/vcvrack-packtau
action: edit
tag: Nightly
target: '$(Build.SourceVersion)'
addChangeLog: false
releaseNotesFile: $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
isPreRelease: true
assets: $(Build.ArtifactStagingDirectory)/*.vcvplugin