ModernUO/azure-pipelines.yml
2020-11-07 13:26:27 -08:00

69 lines
2.1 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: UseDotNet@2
displayName: 'Install .NET 5'
inputs:
packageType: sdk
version: '5.0.100-rc.2.20479.15'
- 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) -f net5.0 --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore -f net5.0
displayName: 'Test'
- job: BuildLinux
strategy:
matrix:
'Debian 9':
containerImage: amd64/buildpack-deps:stretch
'Debian 10':
containerImage: amd64/buildpack-deps:buster
# 'Debian 11':
# containerImage: amd64/buildpack-deps:bullseye
'Ubuntu 16':
containerImage: amd64/buildpack-deps:xenial
'Ubuntu 18':
containerImage: amd64/buildpack-deps:bionic
'Ubuntu 20':
containerImage: amd64/buildpack-deps:focal
displayName: Linux
pool:
vmImage: 'ubuntu-latest'
container: $[ variables['containerImage'] ]
steps:
- task: UseDotNet@2
displayName: 'Install .NET 5'
inputs:
packageType: sdk
version: '5.0.100-rc.2.20479.15'
- 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) -f net5.0 --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore -f net5.0
displayName: 'Test'