-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove build and test jobs for linux/macOS and patch UTs (#655)
* Remove build and test for linux and macos * Update Microsoft.Build pkg and UTs
- Loading branch information
1 parent
7b1ac24
commit d5519a7
Showing
3 changed files
with
110 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,108 @@ | ||
resources: | ||
- repo: self | ||
|
||
variables: | ||
ArtifactsDirectoryName: 'artifacts' | ||
BuildConfiguration: 'Debug' | ||
BuildPlatform: 'Any CPU' | ||
MSBuildArgs: '"/Property:Platform=$(BuildPlatform);Configuration=$(BuildConfiguration)"' | ||
SignType: 'Test' | ||
# Not using "--channel 10.0 --quality daily", see https://github.com/microsoft/slngen/issues/456 | ||
DotNet10InstallArgs: '-version 10.0.100-alpha.1.25074.9' | ||
|
||
trigger: | ||
batch: 'true' | ||
branches: | ||
include: | ||
- 'main' | ||
- 'rel/*' | ||
paths: | ||
exclude: | ||
- '*.md' | ||
pr: | ||
branches: | ||
include: | ||
- 'main' | ||
- 'rel/*' | ||
paths: | ||
exclude: | ||
- '*.md' | ||
|
||
jobs: | ||
- job: BuildAndTest | ||
strategy: | ||
matrix: | ||
Windows: | ||
vmImage: windows-latest | ||
osName: Windows | ||
Linux: | ||
vmImage: ubuntu-latest | ||
osName: Linux | ||
MacOS: | ||
vmImage: macOS-latest | ||
osName: MacOS | ||
displayName: 'Build and Test' | ||
pool: | ||
vmImage: $(vmImage) | ||
steps: | ||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 8.x' | ||
inputs: | ||
version: '8.x' | ||
|
||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 9.x' | ||
inputs: | ||
version: '9.x' | ||
|
||
- script: | | ||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) $(DotNet10InstallArgs) -InstallDir C:\hostedtoolcache\windows\dotnet" | ||
dotnet --info | ||
displayName: 'Install .NET 10.x (Windows)' | ||
condition: eq(variables.osName, 'Windows') | ||
- script: | | ||
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin $(DotNet10InstallArgs) --install-dir /opt/hostedtoolcache/dotnet | ||
dotnet --info | ||
displayName: 'Install .NET 10.x (Linux)' | ||
condition: eq(variables.osName, 'Linux') | ||
- script: | | ||
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin $(DotNet10InstallArgs) --install-dir /Users/runner/hostedtoolcache/dotnet | ||
dotnet --info | ||
displayName: 'Install .NET 10.x (MacOS)' | ||
condition: eq(variables.osName, 'MacOS') | ||
- task: VSBuild@1 | ||
displayName: 'Build (Visual Studio)' | ||
inputs: | ||
msbuildArgs: '$(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/build.binlog"' | ||
condition: eq(variables.osName, 'Windows') | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build (dotnet)' | ||
inputs: | ||
command: 'build' | ||
arguments: '$(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/build.binlog"' | ||
condition: ne(variables.osName, 'Windows') | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET Framework v4.7.2)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net472 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net472.binlog"' | ||
testRunTitle: '$(osName) .NET Framework v4.7.2' | ||
condition: and(succeededOrFailed(), eq(variables.osName, 'Windows')) | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 8)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net8.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net8.0.binlog"' | ||
testRunTitle: '$(osName) .NET 8.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 9)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net9.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net9.0.binlog"' | ||
testRunTitle: '$(osName) .NET 9.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 10)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net10.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net10.0.binlog"' | ||
testRunTitle: '$(osName) .NET 10.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifacts' | ||
inputs: | ||
PathtoPublish: '$(ArtifactsDirectoryName)' | ||
ArtifactName: $(ArtifactsDirectoryName)-$(osName) | ||
condition: always() | ||
resources: | ||
- repo: self | ||
|
||
variables: | ||
ArtifactsDirectoryName: 'artifacts' | ||
BuildConfiguration: 'Debug' | ||
BuildPlatform: 'Any CPU' | ||
MSBuildArgs: '"/Property:Platform=$(BuildPlatform);Configuration=$(BuildConfiguration)"' | ||
SignType: 'Test' | ||
# Not using "--channel 10.0 --quality daily", see https://github.com/microsoft/slngen/issues/456 | ||
DotNet10InstallArgs: '-version 10.0.100-alpha.1.24571.14' | ||
|
||
trigger: | ||
batch: 'true' | ||
branches: | ||
include: | ||
- 'main' | ||
- 'rel/*' | ||
paths: | ||
exclude: | ||
- '*.md' | ||
pr: | ||
branches: | ||
include: | ||
- 'main' | ||
- 'rel/*' | ||
paths: | ||
exclude: | ||
- '*.md' | ||
|
||
jobs: | ||
- job: BuildAndTest | ||
strategy: | ||
matrix: | ||
Windows: | ||
vmImage: windows-latest | ||
osName: Windows | ||
displayName: 'Build and Test' | ||
pool: | ||
vmImage: $(vmImage) | ||
steps: | ||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 8.x' | ||
inputs: | ||
version: '8.x' | ||
|
||
- task: UseDotNet@2 | ||
displayName: 'Install .NET 9.x' | ||
inputs: | ||
version: '9.x' | ||
|
||
- script: | | ||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) $(DotNet10InstallArgs) -InstallDir C:\hostedtoolcache\windows\dotnet" | ||
dotnet --info | ||
displayName: 'Install .NET 10.x (Windows)' | ||
condition: eq(variables.osName, 'Windows') | ||
- task: VSBuild@1 | ||
displayName: 'Build (Visual Studio)' | ||
inputs: | ||
msbuildArgs: '$(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/build.binlog"' | ||
condition: eq(variables.osName, 'Windows') | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Build (dotnet)' | ||
inputs: | ||
command: 'build' | ||
arguments: '$(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/build.binlog"' | ||
condition: ne(variables.osName, 'Windows') | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET Framework v4.7.2)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net472 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net472.binlog"' | ||
testRunTitle: '$(osName) .NET Framework v4.7.2' | ||
condition: and(succeededOrFailed(), eq(variables.osName, 'Windows')) | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 8)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net8.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net8.0.binlog"' | ||
testRunTitle: '$(osName) .NET 8.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 9)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net9.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net9.0.binlog"' | ||
testRunTitle: '$(osName) .NET 9.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run Unit Tests (.NET 10)' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-restore --no-build --framework net10.0 /noautorsp $(MSBuildArgs) "/BinaryLogger:$(ArtifactsDirectoryName)/test-net10.0.binlog"' | ||
testRunTitle: '$(osName) .NET 10.0' | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifacts' | ||
inputs: | ||
PathtoPublish: '$(ArtifactsDirectoryName)' | ||
ArtifactName: $(ArtifactsDirectoryName)-$(osName) | ||
condition: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters