Skip to content

Commit 5685d3d

Browse files
committed
chore: drop net6 support
1 parent d66d209 commit 5685d3d

File tree

5 files changed

+77
-90
lines changed

5 files changed

+77
-90
lines changed

.github/workflows/build.yml

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,85 @@
11
name: Build .NET
22
on:
3-
workflow_call:
4-
inputs:
5-
os_matrix:
6-
description: 'A JSON string array of OS matrix to build against'
7-
default: "[\"macos-latest\", \"ubuntu-latest\", \"windows-latest\"]"
8-
required: false
9-
type: string
3+
workflow_call:
4+
inputs:
5+
os_matrix:
6+
description: "A JSON string array of OS matrix to build against"
7+
default: '["macos-latest", "ubuntu-latest", "windows-latest"]'
8+
required: false
9+
type: string
1010

1111
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
os: ${{fromJson(inputs.os_matrix)}}
18-
env:
19-
# https://www.donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
20-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: '1'
21-
DOTNET_NOLOGO: '1'
22-
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
23-
# See more here: https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/default-probing#how-do-i-debug-the-probing-properties-construction.
24-
COREHOST_TRACE: '0'
25-
# See more here: https://docs.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables.
26-
NUGET_XMLDOC_MODE: 'skip'
27-
DOTNET_MULTILEVEL_LOOKUP: 0
28-
CI_BUILD: 'true'
29-
steps:
30-
- uses: actions/checkout@v2
31-
with:
32-
fetch-depth: 0
33-
- name: Install .NET
34-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
35-
run: |
36-
./eng/install-sdk.sh
37-
echo "DOTNET_ROOT=$GITHUB_WORKSPACE/eng/.dotnet" >> $GITHUB_ENV
38-
echo "$GITHUB_WORKSPACE/eng/.dotnet" >> $GITHUB_PATH
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: ${{fromJson(inputs.os_matrix)}}
18+
env:
19+
# https://www.donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
20+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1"
21+
DOTNET_NOLOGO: "1"
22+
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
23+
# See more here: https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/default-probing#how-do-i-debug-the-probing-properties-construction.
24+
COREHOST_TRACE: "0"
25+
# See more here: https://docs.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables.
26+
NUGET_XMLDOC_MODE: "skip"
27+
DOTNET_MULTILEVEL_LOOKUP: 0
28+
CI_BUILD: "true"
29+
steps:
30+
- uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 0
33+
- name: Install .NET
34+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
35+
run: |
36+
./eng/install-sdk.sh
37+
echo "DOTNET_ROOT=$GITHUB_WORKSPACE/eng/.dotnet" >> $GITHUB_ENV
38+
echo "$GITHUB_WORKSPACE/eng/.dotnet" >> $GITHUB_PATH
3939
40-
- name: Install .NET
41-
if: matrix.os == 'windows-latest'
42-
run: |
43-
./eng/install-sdk.ps1
44-
echo "DOTNET_ROOT=$Env:GITHUB_WORKSPACE/eng/.dotnet" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
45-
echo "$Env:GITHUB_WORKSPACE/eng/.dotnet" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
40+
- name: Install .NET
41+
if: matrix.os == 'windows-latest'
42+
run: |
43+
./eng/install-sdk.ps1
44+
echo "DOTNET_ROOT=$Env:GITHUB_WORKSPACE/eng/.dotnet" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
45+
echo "$Env:GITHUB_WORKSPACE/eng/.dotnet" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
4646
47-
- name: Print host info
48-
run: printenv && dotnet --info
47+
- name: Print host info
48+
run: printenv && dotnet --info
4949

50-
- name: Restore dependencies
51-
run: dotnet restore
50+
- name: Restore dependencies
51+
run: dotnet restore
5252

53-
- name: Build
54-
run: dotnet build --no-restore --no-incremental /WarnAsError
53+
- name: Build
54+
run: dotnet build --no-restore --no-incremental /WarnAsError
5555

56-
- name: Test
57-
run: dotnet test --no-build
56+
- name: Test
57+
run: dotnet test --no-build
5858

59-
- name: Run Tool PowerShell
60-
if: matrix.os == 'windows-latest'
61-
shell: pwsh
62-
run: ./src/dotnet-affected/bin/Debug/net6.0/dotnet-affected -p $Env:GITHUB_WORKSPACE --assume-changes dotnet-affected -v
59+
- name: Run Tool PowerShell
60+
if: matrix.os == 'windows-latest'
61+
shell: pwsh
62+
run: ./src/dotnet-affected/bin/Debug/net9.0/dotnet-affected -p $Env:GITHUB_WORKSPACE --assume-changes dotnet-affected -v
6363

64-
- name: Run Tool Bash
65-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
66-
shell: bash
67-
run: ./src/dotnet-affected/bin/Debug/net6.0/dotnet-affected -p $GITHUB_WORKSPACE --assume-changes dotnet-affected -v
64+
- name: Run Tool Bash
65+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
66+
shell: bash
67+
run: ./src/dotnet-affected/bin/Debug/net9.0/dotnet-affected -p $GITHUB_WORKSPACE --assume-changes dotnet-affected -v
6868

69-
- name: Pack
70-
if: success() && matrix.os == 'ubuntu-latest'
71-
run: dotnet pack --no-restore --no-build --configuration Debug --include-symbols -p:SymbolPackageFormat=snupkg -o $GITHUB_WORKSPACE/packages
69+
- name: Pack
70+
if: success() && matrix.os == 'ubuntu-latest'
71+
run: dotnet pack --no-restore --no-build --configuration Debug --include-symbols -p:SymbolPackageFormat=snupkg -o $GITHUB_WORKSPACE/packages
7272

73-
- uses: actions/upload-artifact@v3
74-
name: 'Upload Packages'
75-
if: success() && matrix.os == 'ubuntu-latest'
76-
with:
77-
name: packages
78-
path: ${{ github.workspace }}/packages/**/*
73+
- uses: actions/upload-artifact@v3
74+
name: "Upload Packages"
75+
if: success() && matrix.os == 'ubuntu-latest'
76+
with:
77+
name: packages
78+
path: ${{ github.workspace }}/packages/**/*
7979

80-
- uses: actions/upload-artifact@v3
81-
name: 'Upload Artifacts'
82-
if: success() && matrix.os == 'ubuntu-latest'
83-
with:
84-
name: artifacts
85-
path: src/dotnet-affected/bin/Debug/net8.0/
80+
- uses: actions/upload-artifact@v3
81+
name: "Upload Artifacts"
82+
if: success() && matrix.os == 'ubuntu-latest'
83+
with:
84+
name: artifacts
85+
path: src/dotnet-affected/bin/Debug/net9.0/

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44

55
<LangVersion>9.0</LangVersion>
66

Directory.Packages.props

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,26 @@
88
<PackageVersion Include="Microsoft.Build.Prediction" Version="1.2.18" />
99
<PackageVersion Include="Microsoft.Build.Locator" Version="1.7.8" />
1010

11+
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
1112
<PackageVersion Include="BenchmarkDotNet.Diagnostics.Windows" Version="0.12.1" Condition="'$(OS)' == 'Windows_NT'"/>
1213

1314
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.0.0" Condition="'$(ContinuousIntegrationBuild)' == 'true'"/>
1415
</ItemGroup>
1516

16-
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
17-
<PackageVersion Include="Microsoft.Build" Version="17.3.2" />
18-
<PackageVersion Include="Microsoft.Build.Framework" Version="17.3.2" />
19-
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.3.2" />
20-
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.2" />
21-
<PackageVersion Include="System.CodeDom" Version="6.0.0" />
22-
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
23-
</ItemGroup>
24-
2517
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2618
<PackageVersion Include="Microsoft.Build" Version="17.11.4" />
2719
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
2820
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.11.4" />
2921
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
3022
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
31-
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
3223
</ItemGroup>
3324

3425
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
35-
<PackageVersion Include="Microsoft.Build" Version="17.11.4" />
36-
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.4" />
37-
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.11.4" />
26+
<PackageVersion Include="Microsoft.Build" Version="17.12.6" />
27+
<PackageVersion Include="Microsoft.Build.Framework" Version="17.12.6" />
28+
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="17.12.6" />
3829
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="9.0.0" />
3930
<PackageVersion Include="System.CodeDom" Version="9.0.0" />
40-
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
4131
</ItemGroup>
4232

4333
</Project>

global.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,5 @@
22
"sdk": {
33
"version": "9.0.101",
44
"allowPrerelease": true
5-
},
6-
"msbuild-sdks": {
7-
"Microsoft.Build.Traversal": "4.1.0"
85
}
96
}

test/DotnetAffected.Testing.Utils/Repository/TemporaryRepositoryExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static ProjectRootElement CreateMsBuildProject(
5151
// Directory.Build.Props / Directory.Packages.props
5252
project.Sdk = "Microsoft.NET.Sdk";
5353
// Required for net8.0 MSBuild Project Creation
54-
project.AddProperty("TargetFrameworks", "net6.0,net8.0,net9.0");
54+
project.AddProperty("TargetFrameworks", "net8.0;net9.0");
5555
customizer?.Invoke(project);
5656

5757
project.Save();

0 commit comments

Comments
 (0)