Adds CentOS to the CI/CD (#302)
This commit is contained in:
parent
013f333898
commit
03f7398655
2 changed files with 28 additions and 6 deletions
|
|
@ -6,6 +6,7 @@ trigger:
|
||||||
variables:
|
variables:
|
||||||
buildConfiguration: 'Release'
|
buildConfiguration: 'Release'
|
||||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||||
|
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: BuildWindows
|
- job: BuildWindows
|
||||||
|
|
@ -22,9 +23,9 @@ jobs:
|
||||||
- task: NuGetAuthenticate@0
|
- task: NuGetAuthenticate@0
|
||||||
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
||||||
displayName: 'Restore NuGet Packages'
|
displayName: 'Restore NuGet Packages'
|
||||||
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/Server/Server.csproj
|
- script: dotnet build -r win-x64 -c $(buildConfiguration) -f net5.0 --no-restore Projects/Server/Server.csproj
|
||||||
displayName: 'Build Server'
|
displayName: 'Build Server'
|
||||||
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
|
- script: dotnet build -r win-x64 -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
|
||||||
displayName: 'Build UO Content'
|
displayName: 'Build UO Content'
|
||||||
- script: dotnet test --no-restore -f net5.0
|
- script: dotnet test --no-restore -f net5.0
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
@ -32,18 +33,30 @@ jobs:
|
||||||
- job: BuildLinux
|
- job: BuildLinux
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
'CentOS 8':
|
||||||
|
containerImage: modernuo/centos-net5:8
|
||||||
|
os: centos.8-x64
|
||||||
|
'CentOS 7':
|
||||||
|
containerImage: centos:7
|
||||||
|
os: centos.7-x64
|
||||||
'Debian 9':
|
'Debian 9':
|
||||||
containerImage: amd64/buildpack-deps:stretch
|
containerImage: amd64/buildpack-deps:stretch
|
||||||
|
os: debian.9-x64
|
||||||
'Debian 10':
|
'Debian 10':
|
||||||
containerImage: amd64/buildpack-deps:buster
|
containerImage: amd64/buildpack-deps:buster
|
||||||
|
os: debian.10-x64
|
||||||
# 'Debian 11':
|
# 'Debian 11':
|
||||||
# containerImage: amd64/buildpack-deps:bullseye
|
# containerImage: amd64/buildpack-deps:bullseye
|
||||||
|
# os: debian.11-x64
|
||||||
'Ubuntu 16':
|
'Ubuntu 16':
|
||||||
containerImage: amd64/buildpack-deps:xenial
|
containerImage: amd64/buildpack-deps:xenial
|
||||||
|
os: ubuntu.16.04-x64
|
||||||
'Ubuntu 18':
|
'Ubuntu 18':
|
||||||
containerImage: amd64/buildpack-deps:bionic
|
containerImage: amd64/buildpack-deps:bionic
|
||||||
|
os: ubuntu.18.04-x64
|
||||||
'Ubuntu 20':
|
'Ubuntu 20':
|
||||||
containerImage: amd64/buildpack-deps:focal
|
containerImage: amd64/buildpack-deps:focal
|
||||||
|
os: ubuntu.20.04-x64
|
||||||
|
|
||||||
displayName: Linux
|
displayName: Linux
|
||||||
|
|
||||||
|
|
@ -59,11 +72,12 @@ jobs:
|
||||||
packageType: sdk
|
packageType: sdk
|
||||||
version: '5.0.100-rc.2.20479.15'
|
version: '5.0.100-rc.2.20479.15'
|
||||||
- task: NuGetAuthenticate@0
|
- task: NuGetAuthenticate@0
|
||||||
|
displayName: Install OpenSSL 1.0 for CentOS 8
|
||||||
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
- script: dotnet restore --force-evaluate --source https://api.nuget.org/v3/index.json
|
||||||
displayName: 'Restore NuGet Packages'
|
displayName: 'Restore NuGet Packages'
|
||||||
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/Server/Server.csproj
|
- script: dotnet build -r $(os) -c $(buildConfiguration) -f net5.0 --no-restore Projects/Server/Server.csproj
|
||||||
displayName: 'Build Server'
|
displayName: 'Build Server'
|
||||||
- script: dotnet build -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
|
- script: dotnet build -r $(os) -c $(buildConfiguration) -f net5.0 --no-restore Projects/UOContent/UOContent.csproj
|
||||||
displayName: 'Build UO Content'
|
displayName: 'Build UO Content'
|
||||||
- script: dotnet test --no-restore -f net5.0
|
- script: dotnet test --no-restore -f net5.0
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
|
||||||
12
publish.cmd
12
publish.cmd
|
|
@ -1,5 +1,3 @@
|
||||||
dotnet restore --force-evaluate
|
|
||||||
|
|
||||||
:<<"::SHELLSCRIPT"
|
:<<"::SHELLSCRIPT"
|
||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
GOTO :CMDSCRIPT
|
GOTO :CMDSCRIPT
|
||||||
|
|
@ -25,6 +23,13 @@ else
|
||||||
config="-c Release"
|
config="-c Release"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $os == *'centos'* || $os == *'rhel'* ]]; then
|
||||||
|
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo dotnet restore --force-evaluate
|
||||||
|
dotnet restore --force-evaluate
|
||||||
|
|
||||||
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
|
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
|
||||||
dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
|
dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution Projects/Server/Server.csproj
|
||||||
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
|
echo dotnet publish ${config} ${os} -f net5.0 --no-restore --self-contained=false -o Distribution/Assemblies Projects/UOContent/UOContent.csproj
|
||||||
|
|
@ -45,6 +50,9 @@ IF "%~2" == "" (
|
||||||
SET os=-r %~1-x64
|
SET os=-r %~1-x64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
echo dotnet restore --force-evaluate
|
||||||
|
dotnet restore --force-evaluate
|
||||||
|
|
||||||
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
|
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
|
||||||
dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
|
dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution Projects\Server\Server.csproj
|
||||||
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
|
echo dotnet publish %config% %os% -f net5.0 --no-restore --self-contained=false -o Distribution\Assemblies Projects\UOContent\UOContent.csproj
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue