aboutsummaryrefslogtreecommitdiffstats
path: root/azure-pipelines.yml
blob: 77092e195b406a4d26a6f4a1b1745e67489e4857 (plain) (blame)
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# Build dexed with JUCE buidls

trigger:
- master

pr:
- master

jobs:
# We projuce on mac and share the assets so we don't have to run projucer on linux
- job: Projuce
  pool:
    vmImage: 'macos-10.14'

  steps:
  - checkout: self
    fetchDepth: 1

  - bash: |
      set -e
      set -o xtrace
      echo "Uname -s output"
      uname -s
     
      git submodule update --init --recursive

      ./scripts/get-juce.sh osx
      ./scripts/projuce.sh

      mkdir pipeline
      tar czf pipeline/juced.tgz Builds/ JuceLibraryCode/
    displayName: Make Projuce Output
    
  - task: PublishPipelineArtifact@0
    inputs:
      artifactName: 'JUCE_OUTPUTS'
      targetPath: 'pipeline/'
    displayName: Publish JUCE Artifacts 
  

- job: Build
  dependsOn: Projuce
  condition: succeeded()
  strategy:
    matrix:
      mac:
        imageName: 'macOS-10.15'
        isMac: True
      win:
        imageName: 'windows-2019'
        isWindows: True
      lin:
        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: |
      mkdir pipeline
    displayName: Setup Pipeline Dir

  - task: DownloadPipelineArtifact@0
    inputs:
      artifactName: 'JUCE_OUTPUTS'
      targetPath: 'pipeline/'

  - bash: |
      ./scripts/get-juce.sh
      ls -l pipeline
      tar xvzf pipeline/juced.tgz
      
      git submodule update --init --recursive

      ./scripts/set-version.sh $(version)

    displayName: Setup for Building

  - bash: |
      ./scripts/build-mac.sh
      ./scripts/package-mac.sh
    displayName: Build Mac Plugins
    condition: variables.isMac


  - task: PublishPipelineArtifact@0
    inputs:
      artifactName: 'MACOS_BUILD'
      targetPath: 'products/'
    displayName: Publish Mac DMG
    condition: variables.isMac

  - task: MSBuild@1
    inputs:
      solution: 'Builds\VisualStudio2019\Dexed.sln'
      maximumCpuCount: true
      platform: 'x64'
      configuration: 'Release'
    condition: variables.isWindows
    displayName: Build Windows x64

  - bash: |
      cd Builds/VisualStudio2019/x64
      mkdir assets
      mv Release/Standalone\ Plugin/Dexed.exe assets/
      mv Release/VST3/Dexed.vst3 assets/
      GIT_TAG=`git rev-parse --short HEAD`
      BUILDDATE=`date +%Y%m%d`
      ZIPV="${GIT_TAG}-${BUILDDATE}"
      7z.exe a ../../../products/Dexed-Win64bit-${ZIPV}.zip assets 
    displayName: Build Windows Zip
    condition: variables.isWindows

  - task: PublishPipelineArtifact@0
    inputs:
      artifactName: 'WINDOWS_BUILD'
      targetPath: 'products/'
    displayName: Publish Windows Zip
    condition: variables.isWindows

  - bash: |
      sudo apt-get update
      sudo apt-get install -y libwebkit2gtk-4.0
      sudo apt-get install -y libcurl4-openssl-dev
      sudo apt-get install -y alsa-base
      sudo apt-get install -y libasound2-dev
      sudo apt-get install -y jack
      sudo apt-get install -y libjack-dev
      sudo apt-get install -y libfreetype6-dev
      sudo apt-get install -y libxinerama-dev
      sudo apt-get install -y libxcb-xinerama0
      sudo apt-get install -y libxinerama1
      sudo apt-get install -y x11proto-xinerama-dev
      sudo apt-get install -y libxrandr-dev
      sudo apt-get install -y libgl1-mesa-dev
      sudo apt-get install -y libxcursor-dev 
      sudo apt-get install -y libxcursor1 
      sudo apt-get install -y libxcb-cursor-dev 
      sudo apt-get install -y libxcb-cursor0
    displayName: Prepare Linux Host
    condition: variables.isLinux

  - bash: |
      ./scripts/build-lin.sh
    displayName: Build Linux Plugins
    condition: variables.isLinux

  - bash: |
      rm -rf products
      mkdir products
      ./scripts/package-lin.sh

      md5sum products/*
      ls -lt products/*
    displayName: Package Linux Plugins
    condition: variables.isLinux

  - task: PublishPipelineArtifact@0
    inputs:
      artifactName: 'LINUX_BUILD'
      targetPath: 'products/'
    displayName: Publish Linux Tar
    condition: variables.isLinux


- job: UpdateGithubRelease
  dependsOn: Build
  condition: and(and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')), eq(variables['version'], 'Nightly'))

  steps:
  - task: DownloadPipelineArtifact@0
    inputs:
      artifactName: 'MACOS_BUILD'
      targetPath: $(Build.ArtifactStagingDirectory)

  - task: DownloadPipelineArtifact@0
    inputs:
      artifactName: 'WINDOWS_BUILD'
      targetPath: $(Build.ArtifactStagingDirectory)

  - task: DownloadPipelineArtifact@0
    inputs:
      artifactName: 'LINUX_BUILD'
      targetPath: $(Build.ArtifactStagingDirectory)

  - bash: |
     scripts/release-notes.sh > $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
     ls $(Build.ArtifactStagingDirectory)
     md5sum $(Build.ArtifactStagingDirectory)/*

    displayName: Fake up release notes and tag release

  - task: GitHubRelease@0
    displayName: "Create New Github Release"
    inputs:
      gitHubConnection: asb2m10
      repositoryName: asb2m10/dexed
      action: 'edit'
      tag: Nightly
      target: '$(Build.SourceVersion)'
      addChangeLog: false
      assetUploadMode: 'delete'
      releaseNotesFile: $(Build.ArtifactStagingDirectory)/ReleaseNotes.md
      assets: $(Build.ArtifactStagingDirectory)/*.*

Un proyecto texto-plano.xyz