ModernUO/azure-pipelines.yml
2020-08-15 14:48:06 -07:00

63 lines
2 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 Core'
inputs:
packageType: sdk
version: '3.1.401'
- 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 netcoreapp3.1 --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) -f netcoreapp3.1 --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore -f netcoreapp3.1
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: UseDotNet@2
displayName: 'Install .NET Core'
inputs:
packageType: sdk
version: '3.1.401'
- 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 netcoreapp3.1 --no-restore Projects/Server/Server.csproj
displayName: 'Build Server'
- script: dotnet build -c $(buildConfiguration) -f netcoreapp3.1 --no-restore Projects/UOContent/UOContent.csproj
displayName: 'Build UO Content'
- script: dotnet test --no-restore -f netcoreapp3.1
displayName: 'Test'