Skip to content

Commit a4267e7

Browse files
authored
Update build system to support v1.4 branch (#211) (#212)
* Update build system to support v1.4 branch * Update build script (cherry picked from commit 618d9dc)
1 parent c19afc7 commit a4267e7

5 files changed

+33
-50
lines changed

Diff for: build-system/azure-pipeline.template.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ jobs:
1212
pool:
1313
vmImage: ${{ parameters.vmImage }}
1414
steps:
15+
- task: UseDotNet@2
16+
displayName: 'Use .NET 7 SDK'
17+
inputs:
18+
version: 7.x
19+
- task: UseDotNet@2
20+
displayName: 'Use .NET Core Runtime 6'
21+
inputs:
22+
packageType: runtime
23+
version: 6.x
24+
- task: UseDotNet@2
25+
displayName: 'Use .NET Core Runtime 3'
26+
inputs:
27+
packageType: runtime
28+
version: 3.x
1529
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
1630
clean: false # whether to fetch clean each time
1731
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules

Diff for: build-system/linux-pr-validation.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ trigger:
55
include:
66
- dev
77
- master
8+
- v1.*
89

910
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
1011

1112
pr:
1213
autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
1314
branches:
14-
include: [ dev, master ] # branch names which will trigger a build
15+
include: [ dev, master, v1.* ] # branch names which will trigger a build
1516

1617
jobs:
1718
- template: azure-pipeline.template.yaml

Diff for: build-system/windows-pr-validation.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ trigger:
55
include:
66
- dev
77
- master
8+
- v1.*
89

910
pr:
1011
autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
1112
branches:
12-
include: [ dev, master ] # branch names which will trigger a build
13+
include: [ dev, master, v1.* ] # branch names which will trigger a build
1314

1415
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
1516

Diff for: build-system/windows-release.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,21 @@ variables:
2121
value: akkadotnet/Akka.Logger.Serilog #replace this
2222

2323
steps:
24+
- task: UseDotNet@2
25+
displayName: 'Use .NET 7 SDK 7.0.x'
26+
inputs:
27+
version: 7.0.x
28+
- task: UseDotNet@2
29+
displayName: 'Use .NET Core Runtime 6.0.x'
30+
inputs:
31+
packageType: runtime
32+
version: 6.0.x
33+
- task: UseDotNet@2
34+
displayName: 'Use .NET Core Runtime 3.1.x'
35+
inputs:
36+
packageType: runtime
37+
version: 3.1.x
38+
2439
- task: BatchScript@1
2540
displayName: 'FAKE Build'
2641
inputs:

Diff for: build.ps1

-48
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ Param(
3030
)
3131

3232
$FakeVersion = "4.61.2"
33-
$DotNetChannel = "LTS";
34-
$DotNetVersion = "3.1.100";
35-
$DotNetInstallerUri = "https://dot.net/v1/dotnet-install.ps1";
3633
$NugetVersion = "4.1.0";
3734
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/v$NugetVersion/nuget.exe"
38-
$ProtobufVersion = "3.4.0"
3935
$DocfxVersion = "2.49.0"
4036

4137
# Make sure tools folder exists
@@ -46,50 +42,6 @@ if (!(Test-Path $ToolPath)) {
4642
New-Item -Path $ToolPath -Type directory | out-null
4743
}
4844

49-
###########################################################################
50-
# INSTALL .NET CORE CLI
51-
###########################################################################
52-
53-
Function Remove-PathVariable([string]$VariableToRemove)
54-
{
55-
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
56-
if ($path -ne $null)
57-
{
58-
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
59-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
60-
}
61-
62-
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
63-
if ($path -ne $null)
64-
{
65-
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
66-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
67-
}
68-
}
69-
70-
# Get .NET Core CLI path if installed.
71-
$FoundDotNetCliVersion = $null;
72-
if (Get-Command dotnet -ErrorAction SilentlyContinue) {
73-
$FoundDotNetCliVersion = dotnet --version;
74-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
75-
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
76-
}
77-
78-
if($FoundDotNetCliVersion -ne $DotNetVersion) {
79-
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
80-
if (!(Test-Path $InstallPath)) {
81-
mkdir -Force $InstallPath | Out-Null;
82-
}
83-
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
84-
& $InstallPath\dotnet-install.ps1 -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath -Architecture x64;
85-
86-
Remove-PathVariable "$InstallPath"
87-
$env:PATH = "$InstallPath;$env:PATH"
88-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
89-
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
90-
$env:DOTNET_ROOT=$InstallPath
91-
}
92-
9345
###########################################################################
9446
# INSTALL NUGET
9547
###########################################################################

0 commit comments

Comments
 (0)