ModernUO/azure-pipelines.yml
2020-07-18 19:03:26 -07:00

53 lines
1.6 KiB
YAML

name: 'Build'
trigger:
- master
variables:
buildConfiguration: 'Release'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
- job: BuildWindows
displayName: 'Windows Server 2019'
pool:
vmImage: 'windows-latest'
steps:
- task: NuGetAuthenticate@0
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
displayName: 'Restore NuGet Packages'
- script: dotnet build -c $(buildConfiguration) --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore
displayName: 'Test'
- job: BuildLinux
strategy:
matrix:
'Debian 10':
containerImage: mcr.microsoft.com/dotnet/core/sdk:3.1-buster
'Ubuntu 18':
containerImage: mcr.microsoft.com/dotnet/core/sdk:3.1-bionic
# 'Ubuntu 20':
# containerImage: mcr.microsoft.com/dotnet/core/sdk:3.1-focal
displayName: Linux
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['containerImage'] ]
steps:
- task: NuGetAuthenticate@0
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
displayName: 'Restore NuGet Packages'
- script: dotnet build -c $(buildConfiguration) --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore
displayName: 'Test'