Skip to content

Commit b6ed9eb

Browse files
committed
ci: upgrades repository to net10
1 parent 101979e commit b6ed9eb

File tree

14 files changed

+72
-126
lines changed

14 files changed

+72
-126
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ extends:
6565
displayName: 'Use .NET 8'
6666
inputs:
6767
version: 8.x
68+
69+
- task: UseDotNet@2
70+
displayName: 'Use .NET 10'
71+
inputs:
72+
version: 10.x
6873

6974
# Install the nuget tool.
7075
- task: NuGetToolInstaller@1
@@ -77,15 +82,15 @@ extends:
7782
- task: DotNetCoreCLI@2
7883
displayName: 'build'
7984
inputs:
80-
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.sln'
85+
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx'
8186
arguments: '--configuration $(BuildConfiguration) --no-incremental'
8287

8388
# Run the Unit test
8489
- task: DotNetCoreCLI@2
8590
displayName: 'test'
8691
inputs:
8792
command: test
88-
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.sln'
93+
projects: '$(Build.SourcesDirectory)\Microsoft.OpenApi.slnx'
8994
arguments: '--configuration $(BuildConfiguration) --no-build'
9095

9196
- task: EsrpCodeSigning@5

.github/workflows/ci-cd.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ jobs:
1313
ARTIFACTS_FOLDER: ${{ github.workspace }}/Artifacts
1414
GITHUB_RUN_NUMBER: ${{ github.run_number }}
1515
steps:
16-
- name: Setup .NET
16+
- name: Setup .NET 8
1717
uses: actions/setup-dotnet@v5
1818
with:
1919
dotnet-version: 8.x
2020

21+
- name: Setup .NET 10
22+
uses: actions/setup-dotnet@v5
23+
with:
24+
dotnet-version: 10.x
25+
2126
- name: Checkout repository
2227
id: checkout_repo
2328
uses: actions/checkout@v6
@@ -29,27 +34,32 @@ jobs:
2934
id: build_projects
3035
shell: pwsh
3136
run: |
32-
dotnet build Microsoft.OpenApi.sln -c Release
37+
dotnet build Microsoft.OpenApi.slnx -c Release
3338
3439
- name: Run unit tests
3540
id: run_unit_tests
3641
shell: pwsh
3742
run: |
38-
dotnet test Microsoft.OpenApi.sln -c Release -v n
43+
dotnet test Microsoft.OpenApi.slnx -c Release -v n
3944
4045
validate-trimming:
4146
name: Validate Project for Trimming
4247
runs-on: windows-latest
4348
steps:
4449
- uses: actions/checkout@v6
4550

46-
- name: Setup .NET
51+
- name: Setup .NET 8
4752
uses: actions/setup-dotnet@v5
4853
with:
4954
dotnet-version: 8.x
5055

56+
- name: Setup .NET 10
57+
uses: actions/setup-dotnet@v5
58+
with:
59+
dotnet-version: 10.x
60+
5161
- name: Validate Trimming warnings
52-
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net8.0
62+
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net10.0
5363
working-directory: ./test/Microsoft.OpenApi.Trimming.Tests
5464

5565
validate-performance:
@@ -60,11 +70,16 @@ jobs:
6070
- name: Checkout repository
6171
uses: actions/checkout@v6
6272

63-
- name: Setup .NET
73+
- name: Setup .NET 8
6474
uses: actions/setup-dotnet@v5
6575
with:
6676
dotnet-version: 8.x
6777

78+
- name: Setup .NET 10
79+
uses: actions/setup-dotnet@v5
80+
with:
81+
dotnet-version: 10.x
82+
6883
- name: Copy committed results
6984
run: |
7085
mkdir -p ./performanceResults

.github/workflows/codeql-analysis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ jobs:
2222
id: checkout_repo
2323
uses: actions/checkout@v6
2424

25-
- name: Setup .NET
25+
- name: Setup .NET 8
2626
uses: actions/setup-dotnet@v5
2727
with:
2828
dotnet-version: 8.0.x
2929

30+
- name: Setup .NET 10
31+
uses: actions/setup-dotnet@v5
32+
with:
33+
dotnet-version: 10.0.x
34+
3035
- name: Initialize CodeQL
3136
id: init_codeql
3237
uses: github/codeql-action/init@v4

.github/workflows/sonarcloud.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ jobs:
3939
with:
4040
distribution: 'adopt'
4141
java-version: 17
42-
- name: Setup .NET
42+
- name: Setup .NET 8
4343
uses: actions/setup-dotnet@v5
4444
with:
4545
dotnet-version: 8.0.x
46+
- name: Setup .NET 10
47+
uses: actions/setup-dotnet@v5
48+
with:
49+
dotnet-version: 10.0.x
4650
- uses: actions/checkout@v6
4751
with:
4852
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
@@ -64,5 +68,5 @@ jobs:
6468
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_OpenAPI.NET" /o:"microsoft" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="test/**/coverage.opencover.xml"
6569
dotnet workload restore
6670
dotnet build
67-
dotnet test Microsoft.OpenApi.sln --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
71+
dotnet test Microsoft.OpenApi.slnx --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
6872
dotnet tool run dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"group": "build",
1111
"args": [
1212
"build",
13-
"${workspaceFolder}/Microsoft.OpenApi.sln",
13+
"${workspaceFolder}/Microsoft.OpenApi.slnx",
1414
"/property:GenerateFullPaths=true",
1515
"/consoleloggerparameters:NoSummary"
1616
],
@@ -23,7 +23,7 @@
2323
"group": "test",
2424
"args": [
2525
"test",
26-
"${workspaceFolder}/Microsoft.OpenApi.sln",
26+
"${workspaceFolder}/Microsoft.OpenApi.slnx",
2727
"/property:GenerateFullPaths=true",
2828
"/consoleloggerparameters:NoSummary",
2929
"--collect:\"XPlat Code Coverage\""

Microsoft.OpenApi.sln

Lines changed: 0 additions & 103 deletions
This file was deleted.

Microsoft.OpenApi.slnx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Solution>
2+
<Folder Name="/performance/">
3+
<Project Path="performance/resultsComparer/resultsComparer.csproj" />
4+
</Folder>
5+
<Folder Name="/Solution Items/">
6+
<File Path=".editorconfig" />
7+
<File Path="build.cmd" />
8+
<File Path="readme.md" />
9+
</Folder>
10+
<Folder Name="/src/">
11+
<Project Path="src/Microsoft.OpenApi.Hidi/Microsoft.OpenApi.Hidi.csproj" />
12+
<Project Path="src/Microsoft.OpenApi.Workbench/Microsoft.OpenApi.Workbench.csproj" />
13+
<Project Path="src/Microsoft.OpenApi.YamlReader/Microsoft.OpenApi.YamlReader.csproj" />
14+
<Project Path="src/Microsoft.OpenApi/Microsoft.OpenApi.csproj" />
15+
</Folder>
16+
<Folder Name="/test/">
17+
<Project Path="test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj" />
18+
<Project Path="test/Microsoft.OpenApi.Readers.Tests/Microsoft.OpenApi.Readers.Tests.csproj" />
19+
<Project Path="test/Microsoft.OpenApi.Tests/Microsoft.OpenApi.Tests.csproj" />
20+
<Project Path="test/Microsoft.OpenApi.Trimming.Tests/Microsoft.OpenApi.Trimming.Tests.csproj" />
21+
</Folder>
22+
<Project Path="performance/benchmark/PerformanceTests.csproj" />
23+
</Solution>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ In order to test the validity of an OpenApi document, we avail the following too
9898
#### Installation guidelines:
9999
1. Clone the repo locally by running this command:
100100
`git clone https://github.com/microsoft/OpenAPI.NET.git`
101-
2. Open the solution file `(.sln)` in the root of the project with Visual Studio
101+
2. Open the solution file `(.slnx)` in the root of the project with Visual Studio
102102
3. Navigate to the `src/Microsoft.OpenApi.Workbench` directory and set it as the startup project
103103
4. Run the project and you'll see a GUI pop up resembling the one below:
104104

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.420"
3+
"version": "10.0.202"
44
}
55
}

test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

0 commit comments

Comments
 (0)