Updates CI with Azure Pipelines (#170)
This commit is contained in:
parent
997691fbb7
commit
bde6d6a149
3 changed files with 92 additions and 24 deletions
28
.github/workflows/dotnet-core.yml
vendored
28
.github/workflows/dotnet-core.yml
vendored
|
|
@ -13,39 +13,19 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
|
||||||
rid: win-x64
|
|
||||||
- os: ubuntu-latest
|
|
||||||
rid: linux-x64
|
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
rid: osx-x64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Setup .NET Core
|
- name: Setup .NET Core
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
with:
|
with:
|
||||||
dotnet-version: 3.1.300
|
dotnet-version: 3.1.301
|
||||||
- name: NuGet Cache
|
- name: Restore NuGet Packages
|
||||||
id: nuget-cache
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.nuget/packages
|
|
||||||
${{ github.workspace }}/Projects/*/obj/project.assets.json
|
|
||||||
${{ github.workspace }}/Projects/*/obj/project.nuget.cache
|
|
||||||
${{ github.workspace }}/Projects/*/obj/*.csproj.nuget.*
|
|
||||||
key: ${{ matrix.os }}-nuget-cache-v7-${{ hashFiles('**/packages.lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ matrix.os }}-nuget-cache-v7
|
|
||||||
- name: Restore dependencies
|
|
||||||
if: steps.nuget-cache.outputs.cache-hit != 'true' || steps.zlib-cache.outputs.cache-hit != 'true'
|
|
||||||
run: dotnet restore --force-evaluate
|
run: dotnet restore --force-evaluate
|
||||||
- name: Build Server
|
- name: Build Server
|
||||||
run: dotnet build -c Release --no-restore Projects/Server/Server.csproj
|
run: dotnet build -c Release --no-restore Projects/Server/Server.csproj
|
||||||
- name: Build UO Content
|
- name: Build UO Content
|
||||||
run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj
|
run: dotnet build -c Release --no-restore Projects/UOContent/UOContent.csproj
|
||||||
- name: Test Server
|
- name: Test
|
||||||
run: dotnet test -r ${{ matrix.rid }} --no-restore Projects/Server.Tests/Server.Tests.csproj
|
run: dotnet test --no-restore
|
||||||
- name: Test UOContent
|
|
||||||
run: dotnet test -r ${{ matrix.rid }} --no-restore Projects/UOContent.Tests/UOContent.Tests.csproj
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ ModernUO [](https://github.com/modernuo/ModernUO/stargazers)
|
[](https://github.com/modernuo/ModernUO/stargazers)
|
||||||
[](https://github.com/modernuo/ModernUO/issues)
|
[](https://github.com/modernuo/ModernUO/issues)
|
||||||
[](https://github.com/modernuo/ModernUO/actions)
|
[](https://github.com/modernuo/ModernUO/actions)
|
||||||
|
[](https://dev.azure.com/modernuo/modernuo/_build/latest?definitionId=1&branchName=master)
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
- See [Goals](./GOALS.md)
|
- See [Goals](./GOALS.md)
|
||||||
|
|
|
||||||
87
azure-pipelines.yml
Normal file
87
azure-pipelines.yml
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
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: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'custom'
|
||||||
|
custom: 'restore'
|
||||||
|
arguments: '--force-evaluate'
|
||||||
|
displayName: 'Restore NuGet Packages'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: '-c $(buildConfiguration) --no-restore'
|
||||||
|
projects: '**/Projects/Server/Server.csproj'
|
||||||
|
displayName: 'Build Server'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: '-c $(buildConfiguration) --no-restore'
|
||||||
|
projects: '**/Projects/UOContent/UOContent.csproj'
|
||||||
|
displayName: 'Build UO Content'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'test'
|
||||||
|
arguments: '--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: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'custom'
|
||||||
|
custom: 'restore'
|
||||||
|
arguments: '--force-evaluate'
|
||||||
|
displayName: 'Restore NuGet Packages'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: '-c $(buildConfiguration) --no-restore'
|
||||||
|
projects: '**/Projects/Server/Server.csproj'
|
||||||
|
displayName: 'Build Server'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: '-c $(buildConfiguration) --no-restore'
|
||||||
|
projects: '**/Projects/UOContent/UOContent.csproj'
|
||||||
|
displayName: 'Build UO Content'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
inputs:
|
||||||
|
command: 'test'
|
||||||
|
arguments: '--no-restore'
|
||||||
|
displayName: 'Test'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue