Skip to content

Commit 42bc730

Browse files
authored
Remove references to .NET 6 (#894)
* Remove net6.0 references and update some nuget packages * NUnit and more dependency upgrades in tests * Update more dependencies * Nuke Update * slightly nicer error messages in fixture * Need to revert ILRepack to older version or it doesn't internalize tinytypes properly. Update other deps * Disable buggy test
1 parent 1d7b99b commit 42bc730

25 files changed

+352
-375
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ jobs:
3939
with:
4040
fetch-depth: 0 # all
4141

42-
- name: Setup .NET 6.0
43-
uses: actions/setup-dotnet@v4
44-
with:
45-
dotnet-version: 6.0.x
46-
4742
- name: Setup .NET 8.0
4843
uses: actions/setup-dotnet@v4
4944
with:
@@ -79,15 +74,6 @@ jobs:
7974
reporter: dotnet-trx
8075
fail-on-error: true
8176

82-
- name: Windows .NET 6.0 unit test report
83-
uses: dorny/test-reporter@v1
84-
if: success() || failure() # run this step even if previous step failed
85-
with:
86-
name: Windows .Net 6.0 unit test results
87-
path: ./TestResults/Win_net6.0_*.trx
88-
reporter: dotnet-trx
89-
fail-on-error: true
90-
9177
- name: Windows .NET 8.0 unit test report
9278
uses: dorny/test-reporter@v1
9379
if: success() || failure() # run this step even if previous step failed
@@ -117,15 +103,6 @@ jobs:
117103
reporter: dotnet-trx
118104
fail-on-error: true
119105

120-
- name: Windows .NET 6.0 E2E test report
121-
uses: dorny/test-reporter@v1
122-
if: success() || failure() # run this step even if previous step failed
123-
with:
124-
name: Windows .NET 6.0 E2E test results
125-
path: ./TestResults/Win-E2E_net6.0_*.trx
126-
reporter: dotnet-trx
127-
fail-on-error: true
128-
129106
- name: Windows .NET 8.0 E2E test report
130107
uses: dorny/test-reporter@v1
131108
if: success() || failure() # run this step even if previous step failed
@@ -161,11 +138,6 @@ jobs:
161138
steps:
162139
- uses: actions/checkout@v4
163140

164-
- name: Setup .NET 6.0
165-
uses: actions/setup-dotnet@v4
166-
with:
167-
dotnet-version: 6.0.x
168-
169141
- name: Setup .NET 8
170142
uses: actions/setup-dotnet@v4
171143
with:
@@ -191,11 +163,6 @@ jobs:
191163
steps:
192164
- uses: actions/checkout@v4
193165

194-
- name: Setup .NET 6.0
195-
uses: actions/setup-dotnet@v4
196-
with:
197-
dotnet-version: 6.0.x
198-
199166
- name: Setup .NET 8
200167
uses: actions/setup-dotnet@v4
201168
with:

.nuke/build.schema.json

Lines changed: 96 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,56 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"$ref": "#/definitions/build",
4-
"title": "Build Schema",
53
"definitions": {
6-
"build": {
7-
"type": "object",
4+
"Host": {
5+
"type": "string",
6+
"enum": [
7+
"AppVeyor",
8+
"AzurePipelines",
9+
"Bamboo",
10+
"Bitbucket",
11+
"Bitrise",
12+
"GitHubActions",
13+
"GitLab",
14+
"Jenkins",
15+
"Rider",
16+
"SpaceAutomation",
17+
"TeamCity",
18+
"Terminal",
19+
"TravisCI",
20+
"VisualStudio",
21+
"VSCode"
22+
]
23+
},
24+
"ExecutableTarget": {
25+
"type": "string",
26+
"enum": [
27+
"Clean",
28+
"Compile",
29+
"CopyToLocalPackages",
30+
"CopyUnsignedNugetToLocalPackages",
31+
"Default",
32+
"Merge",
33+
"PackSignedMergedClientNuget",
34+
"PackSignedNormalClientNuget",
35+
"PackUnsignedNonMergedClientNuget",
36+
"PackUnsignedNormalClientNuget",
37+
"Restore",
38+
"Test",
39+
"TestClientNugetPackage"
40+
]
41+
},
42+
"Verbosity": {
43+
"type": "string",
44+
"description": "",
45+
"enum": [
46+
"Verbose",
47+
"Normal",
48+
"Minimal",
49+
"Quiet"
50+
]
51+
},
52+
"NukeBuild": {
853
"properties": {
9-
"AutoDetectBranch": {
10-
"type": "boolean",
11-
"description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
12-
},
13-
"AzureKeyVaultAppId": {
14-
"type": "string"
15-
},
16-
"AzureKeyVaultAppSecret": {
17-
"type": "string",
18-
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
19-
},
20-
"AzureKeyVaultCertificateName": {
21-
"type": "string"
22-
},
23-
"AzureKeyVaultTenantId": {
24-
"type": "string"
25-
},
26-
"AzureKeyVaultUrl": {
27-
"type": "string"
28-
},
29-
"Configuration": {
30-
"type": "string"
31-
},
3254
"Continue": {
3355
"type": "boolean",
3456
"description": "Indicates to continue a previously failed build attempt"
@@ -38,34 +60,13 @@
3860
"description": "Shows the help text for this build assembly"
3961
},
4062
"Host": {
41-
"type": "string",
4263
"description": "Host for execution. Default is 'automatic'",
43-
"enum": [
44-
"AppVeyor",
45-
"AzurePipelines",
46-
"Bamboo",
47-
"Bitbucket",
48-
"Bitrise",
49-
"GitHubActions",
50-
"GitLab",
51-
"Jenkins",
52-
"Rider",
53-
"SpaceAutomation",
54-
"TeamCity",
55-
"Terminal",
56-
"TravisCI",
57-
"VisualStudio",
58-
"VSCode"
59-
]
64+
"$ref": "#/definitions/Host"
6065
},
6166
"NoLogo": {
6267
"type": "boolean",
6368
"description": "Disables displaying the NUKE logo"
6469
},
65-
"OCTOVERSION_CurrentBranch": {
66-
"type": "string",
67-
"description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
68-
},
6970
"Partition": {
7071
"type": "string",
7172
"description": "Partition to use on CI"
@@ -85,67 +86,67 @@
8586
"type": "string",
8687
"description": "Root directory during build execution"
8788
},
88-
"SigningCertificatePassword": {
89-
"type": "string"
90-
},
91-
"SigningCertificatePath": {
92-
"type": "string"
93-
},
9489
"Skip": {
9590
"type": "array",
9691
"description": "List of targets to be skipped. Empty list skips all dependencies",
9792
"items": {
98-
"type": "string",
99-
"enum": [
100-
"Clean",
101-
"Compile",
102-
"CopyToLocalPackages",
103-
"CopyUnsignedNugetToLocalPackages",
104-
"Default",
105-
"Merge",
106-
"PackSignedMergedClientNuget",
107-
"PackSignedNormalClientNuget",
108-
"PackUnsignedNonMergedClientNuget",
109-
"PackUnsignedNormalClientNuget",
110-
"Restore",
111-
"Test",
112-
"TestClientNugetPackage"
113-
]
93+
"$ref": "#/definitions/ExecutableTarget"
11494
}
11595
},
11696
"Target": {
11797
"type": "array",
11898
"description": "List of targets to be invoked. Default is '{default_target}'",
11999
"items": {
120-
"type": "string",
121-
"enum": [
122-
"Clean",
123-
"Compile",
124-
"CopyToLocalPackages",
125-
"CopyUnsignedNugetToLocalPackages",
126-
"Default",
127-
"Merge",
128-
"PackSignedMergedClientNuget",
129-
"PackSignedNormalClientNuget",
130-
"PackUnsignedNonMergedClientNuget",
131-
"PackUnsignedNormalClientNuget",
132-
"Restore",
133-
"Test",
134-
"TestClientNugetPackage"
135-
]
100+
"$ref": "#/definitions/ExecutableTarget"
136101
}
137102
},
138103
"Verbosity": {
139-
"type": "string",
140104
"description": "Logging verbosity during build execution. Default is 'Normal'",
141-
"enum": [
142-
"Minimal",
143-
"Normal",
144-
"Quiet",
145-
"Verbose"
146-
]
105+
"$ref": "#/definitions/Verbosity"
106+
}
107+
}
108+
}
109+
},
110+
"allOf": [
111+
{
112+
"properties": {
113+
"AutoDetectBranch": {
114+
"type": "boolean",
115+
"description": "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI"
116+
},
117+
"AzureKeyVaultAppId": {
118+
"type": "string"
119+
},
120+
"AzureKeyVaultAppSecret": {
121+
"type": "string",
122+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
123+
},
124+
"AzureKeyVaultCertificateName": {
125+
"type": "string"
126+
},
127+
"AzureKeyVaultTenantId": {
128+
"type": "string"
129+
},
130+
"AzureKeyVaultUrl": {
131+
"type": "string"
132+
},
133+
"Configuration": {
134+
"type": "string"
135+
},
136+
"OCTOVERSION_CurrentBranch": {
137+
"type": "string",
138+
"description": "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch"
139+
},
140+
"SigningCertificatePassword": {
141+
"type": "string"
142+
},
143+
"SigningCertificatePath": {
144+
"type": "string"
147145
}
148146
}
147+
},
148+
{
149+
"$ref": "#/definitions/NukeBuild"
149150
}
150-
}
151+
]
151152
}

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
:; exit $?
55

66
@ECHO OFF
7-
powershell -ExecutionPolicy ByPass -NoProfile "%~dp0build.ps1" %*
7+
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*

build.ps1

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Param(
44
[string[]]$BuildArguments
55
)
66

7-
$env:LOCAL_TEST_DIR = "$(Get-Location)\TestResults"
87
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
98

109
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
@@ -19,11 +18,10 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp"
1918

2019
$DotNetGlobalFile = "$PSScriptRoot\\global.json"
2120
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
22-
$DotNetChannel = "Current"
21+
$DotNetChannel = "STS"
2322

24-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
2523
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
26-
$env:DOTNET_MULTILEVEL_LOOKUP = 0
24+
$env:DOTNET_NOLOGO = 1
2725

2826
###########################################################################
2927
# EXECUTION
@@ -57,14 +55,20 @@ else {
5755
# Install by channel or version
5856
$DotNetDirectory = "$TempDirectory\dotnet-win"
5957
if (!(Test-Path variable:DotNetVersion)) {
60-
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
58+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
6159
} else {
62-
ExecSafe { & $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
60+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
6361
}
6462
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
63+
$env:PATH = "$DotNetDirectory;$env:PATH"
6564
}
6665

67-
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
66+
Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"
67+
68+
if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
69+
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
70+
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
71+
}
6872

6973
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
7074
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

build.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
1414

1515
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"
1616
DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh"
17-
DOTNET_CHANNEL="Current"
17+
DOTNET_CHANNEL="STS"
1818

1919
export DOTNET_CLI_TELEMETRY_OPTOUT=1
20-
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21-
export DOTNET_MULTILEVEL_LOOKUP=0
22-
export LOCAL_TEST_DIR=$PWD/TestResults
20+
export DOTNET_NOLOGO=1
21+
2322
###########################################################################
2423
# EXECUTION
2524
###########################################################################
@@ -54,9 +53,15 @@ else
5453
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
5554
fi
5655
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"
56+
export PATH="$DOTNET_DIRECTORY:$PATH"
5757
fi
5858

59-
echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
59+
echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)"
60+
61+
if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then
62+
"$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true
63+
"$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true
64+
fi
6065

6166
"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet
6267
"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@"

0 commit comments

Comments
 (0)