Skip to content

Commit 5974053

Browse files
committed
GitTools#3169 - added .net 7.0 support, +semver: major
1 parent a405174 commit 5974053

26 files changed

+88
-75
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ jobs:
5555
path: run
5656
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
5757
-
58-
name: Install .NET SDK 6.0.x
59-
uses: actions/setup-dotnet@v3
58+
name: Setup .NET SDK
59+
uses: actions/setup-dotnet@v3.0.2
6060
with:
61-
dotnet-version: '6.0.x'
61+
dotnet-version: '7.0.x'
62+
dotnet-quality: 'preview'
6263
-
6364
name: '[Prepare]'
6465
if: steps.cache-cake.outputs.cache-hit != 'true'
@@ -94,10 +95,11 @@ jobs:
9495
path: tools
9596
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
9697
-
97-
name: Install .NET SDK 6.0.x
98-
uses: actions/setup-dotnet@v3
98+
name: Setup .NET SDK
99+
uses: actions/setup-dotnet@v3.0.2
99100
with:
100-
dotnet-version: '6.0.x'
101+
dotnet-version: '7.0.x'
102+
dotnet-quality: 'preview'
101103
-
102104
name: '[Build]'
103105
shell: pwsh
@@ -133,7 +135,7 @@ jobs:
133135
strategy:
134136
matrix:
135137
os: [windows-latest, ubuntu-latest, macos-latest]
136-
targetFramework: [net6.0]
138+
targetFramework: [net7.0, net6.0]
137139
fail-fast: false
138140

139141
steps:
@@ -157,10 +159,11 @@ jobs:
157159
path: tools
158160
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
159161
-
160-
name: Install .NET SDK 6.0.x
161-
uses: actions/setup-dotnet@v3
162+
name: Setup .NET SDK
163+
uses: actions/setup-dotnet@v3.0.2
162164
with:
163-
dotnet-version: '6.0.x'
165+
dotnet-version: '7.0.x'
166+
dotnet-quality: 'preview'
164167
-
165168
name: '[Unit Test]'
166169
shell: pwsh
@@ -209,10 +212,11 @@ jobs:
209212
name: nuget
210213
path: ${{ github.workspace }}/artifacts/packages/nuget
211214
-
212-
name: Install .NET SDK 6.0.x
213-
uses: actions/setup-dotnet@v3
215+
name: Setup .NET SDK
216+
uses: actions/setup-dotnet@v3.0.2
214217
with:
215-
dotnet-version: '6.0.x'
218+
dotnet-version: '7.0.x'
219+
dotnet-quality: 'preview'
216220
-
217221
name: '[Test Artifacts]'
218222
shell: pwsh
@@ -224,7 +228,7 @@ jobs:
224228
runs-on: ubuntu-latest
225229
strategy:
226230
matrix:
227-
targetFramework: [ '6.0' ]
231+
targetFramework: [ '7.0', '6.0' ]
228232
distro: [ alpine.3.13, alpine.3.14, centos.7, centos.8, debian.10, debian.11, fedora.33, ubuntu.18.04, ubuntu.20.04, ubuntu.22.04 ]
229233
fail-fast: false
230234

@@ -269,10 +273,11 @@ jobs:
269273
with:
270274
install: true
271275
-
272-
name: Install .NET SDK 6.0.x
273-
uses: actions/setup-dotnet@v3
276+
name: Setup .NET SDK
277+
uses: actions/setup-dotnet@v3.0.2
274278
with:
275-
dotnet-version: '6.0.x'
279+
dotnet-version: '7.0.x'
280+
dotnet-quality: 'preview'
276281
-
277282
name: '[Test Artifacts (amd64)]'
278283
shell: pwsh
@@ -288,7 +293,7 @@ jobs:
288293
runs-on: ubuntu-latest
289294
strategy:
290295
matrix:
291-
targetFramework: [ '6.0' ]
296+
targetFramework: [ '7.0', '6.0' ]
292297
distro: [ alpine.3.13, alpine.3.14, centos.7, centos.8, debian.10, debian.11, fedora.33, ubuntu.18.04, ubuntu.20.04, ubuntu.22.04 ]
293298
fail-fast: false
294299

@@ -327,10 +332,11 @@ jobs:
327332
with:
328333
install: true
329334
-
330-
name: Install .NET SDK 6.0.x
331-
uses: actions/setup-dotnet@v3
335+
name: Setup .NET SDK
336+
uses: actions/setup-dotnet@v3.0.2
332337
with:
333-
dotnet-version: '6.0.x'
338+
dotnet-version: '7.0.x'
339+
dotnet-quality: 'preview'
334340
-
335341
name: Login to DockerHub
336342
if: success() && github.event_name != 'pull_request' && github.repository_owner == 'GitTools'
@@ -417,10 +423,11 @@ jobs:
417423
name: nuget
418424
path: ${{ github.workspace }}/artifacts/packages/nuget
419425
-
420-
name: Install .NET SDK 6.0.x
421-
uses: actions/setup-dotnet@v3
426+
name: Setup .NET SDK
427+
uses: actions/setup-dotnet@v3.0.2
422428
with:
423-
dotnet-version: '6.0.x'
429+
dotnet-version: '7.0.x'
430+
dotnet-quality: 'preview'
424431
-
425432
name: '[Publish]'
426433
shell: pwsh
@@ -471,10 +478,11 @@ jobs:
471478
name: native-macOS
472479
path: ${{ github.workspace }}/artifacts/packages/native
473480
-
474-
name: Install .NET SDK 6.0.x
475-
uses: actions/setup-dotnet@v3
481+
name: Setup .NET SDK
482+
uses: actions/setup-dotnet@v3.0.2
476483
with:
477-
dotnet-version: '6.0.x'
484+
dotnet-version: '7.0.x'
485+
dotnet-quality: 'preview'
478486
-
479487
name: '[Release]'
480488
shell: pwsh

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ jobs:
5858
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
5959

6060
-
61-
name: Install .NET SDKs
62-
uses: actions/setup-dotnet@v3
61+
name: Setup .NET SDK
62+
uses: actions/setup-dotnet@v3.0.2
6363
with:
64-
dotnet-version: |
65-
6.0.x
64+
dotnet-version: '7.0.x'
65+
dotnet-quality: 'preview'
6666

6767
-
6868
name: '[Prepare]'

.github/workflows/docs.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ jobs:
6969
key: node-${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
7070
restore-keys: node-${{ runner.os }}
7171
-
72-
name: Install .NET SDK 6.0.x
73-
uses: actions/setup-dotnet@v3
72+
name: Setup .NET SDK
73+
uses: actions/setup-dotnet@v3.0.2
7474
with:
75-
dotnet-version: '6.0.x'
75+
dotnet-version: '7.0.x'
76+
dotnet-quality: 'preview'
7677
-
7778
name: '[Prepare]'
7879
if: steps.cache-cake.outputs.cache-hit != 'true'
@@ -103,10 +104,11 @@ jobs:
103104
path: tools
104105
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
105106
-
106-
name: Install .NET SDK 6.0.x
107-
uses: actions/setup-dotnet@v3
107+
name: Setup .NET SDK
108+
uses: actions/setup-dotnet@v3.0.2
108109
with:
109-
dotnet-version: '6.0.x'
110+
dotnet-version: '7.0.x'
111+
dotnet-quality: 'preview'
110112
-
111113
name: '[Build Documentation]'
112114
shell: pwsh
@@ -160,10 +162,11 @@ jobs:
160162
path: tools
161163
key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }}
162164
-
163-
name: Install .NET SDK 6.0.x
164-
uses: actions/setup-dotnet@v3
165+
name: Setup .NET SDK
166+
uses: actions/setup-dotnet@v3.0.2
165167
with:
166-
dotnet-version: '6.0.x'
168+
dotnet-version: '7.0.x'
169+
dotnet-quality: 'preview'
167170
-
168171
name: '[Publish Documentation]'
169172
if: ${{ github.event_name == 'push' }}

.github/workflows/format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ jobs:
3030
- uses: actions/checkout@v3
3131
-
3232
name: Setup .NET SDK
33-
uses: actions/setup-dotnet@v3
33+
uses: actions/setup-dotnet@v3.0.2
3434
with:
35-
dotnet-version: '6.0.x'
35+
dotnet-version: '7.0.x'
36+
dotnet-quality: 'preview'
3637
-
3738
name: Run Format Build solution
3839
run: dotnet format ./build/ --verify-no-changes

build/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project>
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
66
<OutputPath>..\..\run\</OutputPath>
77
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
88
<Nullable>enable</Nullable>
9-
<LangVersion>10</LangVersion>
9+
<LangVersion>11</LangVersion>
1010
<NoWarn>NU1604</NoWarn>
1111
<ImplicitUsings>enable</ImplicitUsings>
1212
</PropertyGroup>

build/artifacts/Tasks/ArtifactsDotnetToolTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsDotnetToolTest))]
66
[TaskDescription("Tests the dotnet global tool in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version70)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine313, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsDotnetToolTest : FrostingTask<BuildContext>

build/artifacts/Tasks/ArtifactsMsBuildCoreTest.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsMsBuildCoreTest))]
66
[TaskDescription("Tests the msbuild package in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version70)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine313, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsMsBuildCoreTest : FrostingTask<BuildContext>
@@ -29,12 +29,11 @@ public override void Run(BuildContext context)
2929
{
3030
if (context.SkipImage(dockerImage)) continue;
3131

32-
string distro = dockerImage.Distro;
3332
string targetFramework = dockerImage.TargetFramework;
3433

3534
targetFramework = targetFramework switch
3635
{
37-
Constants.Version60 => $"net{targetFramework}",
36+
Constants.Version60 or Constants.Version70 => $"net{targetFramework}",
3837
_ => targetFramework
3938
};
4039

build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public override void Run(BuildContext context)
2323
var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath;
2424

2525
context.Information("\nTesting msbuild task with dotnet build (for .net core)\n");
26-
var frameworks = new[] { Constants.NetVersion60 };
26+
var frameworks = new[] { Constants.NetVersion60, Constants.NetVersion70 };
2727
foreach (var framework in frameworks)
2828
{
2929
var dotnetMsBuildSettings = new DotNetMSBuildSettings();

build/artifacts/Tasks/ArtifactsNativeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsNativeTest))]
66
[TaskDescription("Tests the native executables in docker container")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version70)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine313, Constants.Debian10, Constants.Ubuntu2004)]
1010
[IsDependentOn(typeof(ArtifactsPrepare))]
1111
public class ArtifactsNativeTest : FrostingTask<BuildContext>

build/artifacts/Tasks/ArtifactsPrepare.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Artifacts.Tasks;
55
[TaskName(nameof(ArtifactsPrepare))]
66
[TaskDescription("Pulls the docker images needed for testing the artifacts")]
77
[TaskArgument(Arguments.DockerRegistry, Constants.DockerHub, Constants.GitHub)]
8-
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60)]
8+
[TaskArgument(Arguments.DockerDotnetVersion, Constants.Version60, Constants.Version70)]
99
[TaskArgument(Arguments.DockerDistro, Constants.Alpine313, Constants.Debian10, Constants.Ubuntu2004)]
1010
public class ArtifactsPrepare : FrostingTask<BuildContext>
1111
{

0 commit comments

Comments
 (0)