Merge branch 'main' into microbuild

This commit is contained in:
Andrew Arnott 2023-05-11 08:59:10 -06:00
Родитель dfcf3754d5 4d4c330486
Коммит 78fe84b5cd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F33A420C60ED9C6F
6 изменённых файлов: 9 добавлений и 12 удалений

Просмотреть файл

@ -1,5 +1,5 @@
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
FROM mcr.microsoft.com/dotnet/sdk:7.0.101-jammy
FROM mcr.microsoft.com/dotnet/sdk:7.0.203-jammy
# Installing mono makes `dotnet test` work without errors even for net472.
# But installing it takes a long time, so it's excluded by default.

3
.github/workflows/build.yml поставляемый
Просмотреть файл

@ -9,7 +9,6 @@ on:
pull_request:
env:
MSBuildTreatWarningsAsErrors: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BUILDCONFIGURATION: Release
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
@ -45,7 +44,7 @@ jobs:
run: azure-pipelines/variables/_pipelines.ps1
shell: pwsh
- name: 🛠 build
run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} /v:m /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog"
run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnaserror /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog"
- name: 🧪 test
run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
shell: pwsh

Просмотреть файл

@ -24,7 +24,6 @@ parameters:
default: true
variables:
MSBuildTreatWarningsAsErrors: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/

Просмотреть файл

@ -3,7 +3,7 @@ parameters:
steps:
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnaserror /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
displayName: 🛠 dotnet build
- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults

Просмотреть файл

@ -46,7 +46,6 @@ stages:
- stage: Build
variables:
MSBuildTreatWarningsAsErrors: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BuildConfiguration: Release
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages

Просмотреть файл

@ -106,13 +106,13 @@ Push-Location $PSScriptRoot
try {
$HeaderColor = 'Green'
if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
$RestoreArguments = @()
if ($Interactive)
{
$RestoreArguments += '--interactive'
}
$RestoreArguments = @()
if ($Interactive)
{
$RestoreArguments += '--interactive'
}
if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
Write-Host "Restoring NuGet packages" -ForegroundColor $HeaderColor
dotnet restore @RestoreArguments
if ($lastexitcode -ne 0) {