Skip to content

Commit

Permalink
Change: Add Azure YML
Browse files Browse the repository at this point in the history
  • Loading branch information
leezer3 committed Nov 20, 2020
1 parent 5e02135 commit 34de06b
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# This YAML runs the daily test and upload builds on the master branch

trigger:
- master

### Test on latest Windows and .Net version

jobs:
- job: WindowsBuild
displayName: 'Build on Windows (sln)'
pool:
vmImage: 'windows-latest'

variables:
solution: 'OpenBVE.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

### Build and upload via makefile on OS-X
### This uses Mono 6.8.0 as the default version isn't high enough on this image
### As we're 32-bit only at present 10.15+ is no good to us

- job: AppleMakeBuild
displayName: 'Build on Apple OS-X (makefile)'
pool:
vmImage: 'macos-10.14'

variables:
solution: 'OpenBVE.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1
### Default Mono version isn't high enough on this OS-X image so kick to the latest
- script: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 6_8_0
- script: make publish
- task: CopyFilesOverSSH@0
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
sshEndpoint: 'BuildServer'
contents: \*.dmg
targetFolder: '/var/www/vps.bvecornwall.co.uk/public/OpenBVE/Builds/'
overwrite: true

### Linux makefile build
### This runs on the latest Mono version installed

- job: LinuxMakeBuild
displayName: 'Build on Linux (makefile)'
pool:
vmImage: 'ubuntu-16.04'

variables:
solution: 'OpenBVE.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1
- script: make publish
- task: CopyFilesOverSSH@0
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
sshEndpoint: 'BuildServer'
contents: \*.zip
targetFolder: '/var/www/vps.bvecornwall.co.uk/public/OpenBVE/Builds/'
overwrite: true

0 comments on commit 34de06b

Please sign in to comment.