Skip to content

Commit a66cd60

Browse files
Replace build system (#288)
* removed unused junk * added updated scripts * simplify `dotnet` commands * added coverlet settings * fixed test execution errors * added coverlet * simplify * fix release pipeline
1 parent 167f353 commit a66cd60

33 files changed

+224
-1148
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
version: 2
22
updates:
3-
- package-ecosystem: nuget
3+
- package-ecosystem: github-actions
44
directory: "/"
55
schedule:
66
interval: daily
7-
open-pull-requests-limit: 10
8-
ignore:
9-
- dependency-name: Akka.Cluster.TestKit
10-
versions:
11-
- 1.4.16
12-
- 1.4.17
13-
- 1.4.18
14-
- dependency-name: Akka.TestKit.Xunit2
15-
versions:
16-
- 1.4.16
17-
- 1.4.17
18-
- 1.4.18
19-
- dependency-name: Akka.Remote.TestKit
20-
versions:
21-
- 1.4.16
22-
- 1.4.17
23-
- 1.4.18
7+
8+
- package-ecosystem: "dotnet-sdk"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
day: "wednesday"
13+
14+
- package-ecosystem: nuget
15+
directory: "/"
16+
schedule:
17+
interval: daily

Akka.MultiNodeTestRunner.sln

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ VisualStudioVersion = 16.0.29230.47
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{79D71264-186B-4F62-8930-35DD9ECCAF3B}"
77
ProjectSection(SolutionItems) = preProject
8-
build.cmd = build.cmd
9-
build.fsx = build.fsx
108
build.ps1 = build.ps1
11-
build.sh = build.sh
129
README.md = README.md
1310
RELEASE_NOTES.md = RELEASE_NOTES.md
14-
src\Directory.Build.props = src\Directory.Build.props
15-
src\Directory.Packages.props = src\Directory.Packages.props
11+
coverlet.runsettings = coverlet.runsettings
12+
Directory.Build.props = Directory.Build.props
13+
Directory.Packages.props = Directory.Packages.props
14+
global.json = global.json
1615
EndProjectSection
1716
EndProject
1817
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.MultiNode.TestAdapter", "src\Akka.MultiNode.TestAdapter\Akka.MultiNode.TestAdapter.csproj", "{F3037C62-E780-4619-89B3-BA21C7168DFA}"
@@ -23,14 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.MultiNode.TestAdapter.
2322
EndProject
2423
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.MultiNode.RemoteHost", "src\Akka.MultiNode.RemoteHost\Akka.MultiNode.RemoteHost.csproj", "{D59D10BA-E776-4AC6-B8F0-BAB40544439C}"
2524
EndProject
26-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build-system", "build-system", "{C7DE41DA-ADDE-498E-95DB-D760C32D3C6B}"
27-
ProjectSection(SolutionItems) = preProject
28-
build-system\azure-pipeline.template.yaml = build-system\azure-pipeline.template.yaml
29-
build-system\pr-validation.yaml = build-system\pr-validation.yaml
30-
build-system\README.md = build-system\README.md
31-
build-system\windows-release.yaml = build-system\windows-release.yaml
32-
EndProjectSection
33-
EndProject
3425
Global
3526
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3627
Debug|Any CPU = Debug|Any CPU
@@ -61,6 +52,5 @@ Global
6152
SolutionGuid = {B99E6BB8-642A-4A68-86DF-69567CBA700A}
6253
EndGlobalSection
6354
GlobalSection(NestedProjects) = preSolution
64-
{C7DE41DA-ADDE-498E-95DB-D760C32D3C6B} = {79D71264-186B-4F62-8930-35DD9ECCAF3B}
6555
EndGlobalSection
6656
EndGlobal

CODE_OF_CONDUCT.md

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<Project>
22
<PropertyGroup>
3-
<Copyright>Copyright © 2013-2023 Akka.NET Team</Copyright>
3+
<Copyright>Copyright © 2013-$([System.DateTime]::Now.Year) Akka.NET Team</Copyright>
44
<Authors>Akka.NET Team</Authors>
5-
<VersionPrefix>1.5.8</VersionPrefix>
5+
<VersionPrefix>1.5.28</VersionPrefix>
66
<NoWarn>$(NoWarn);CS1591;xUnit1013</NoWarn>
77
<LangVersion>latest</LangVersion>
88
</PropertyGroup>
99
<PropertyGroup>
10-
<NetCoreTestVersion>netcoreapp3.1</NetCoreTestVersion>
11-
<NetTestVersion>net6.0</NetTestVersion>
10+
<NetTestVersion>net9.0</NetTestVersion>
1211
<NetStandardLibVersion>netstandard2.0</NetStandardLibVersion>
1312
</PropertyGroup>
1413
<PropertyGroup>
@@ -20,16 +19,18 @@
2019
</ItemGroup>
2120
<!-- Embedded icon and readme file -->
2221
<ItemGroup>
23-
<None Include="$(MSBuildThisFileDirectory)\..\docs\images\icon.png" Pack="true" PackagePath="\" />
24-
<None Include="$(MSBuildThisFileDirectory)\..\README.md" Pack="true" PackagePath="\" />
22+
<None Include="$(MSBuildThisFileDirectory)\akkalogo.png" Pack="true" PackagePath="\" />
23+
<None Include="$(MSBuildThisFileDirectory)\README.md" Pack="true" PackagePath="\" />
2524
</ItemGroup>
2625
<!-- NuGet .nupkg options -->
2726
<PropertyGroup>
28-
<PackageReleaseNotes>[Updated Akka.NET to 1.5.8](https://github.com/akkadotnet/akka.net/releases/tag/1.5.8) - which resolves issues with Akka.NET runtime and `Polyfill` errors.</PackageReleaseNotes>
27+
<PackageReleaseNotes>1.5.25 June 17 2024
28+
29+
* [Updated Akka.NET to 1.5.25](https://github.com/akkadotnet/akka.net/releases/tag/1.5.25)</PackageReleaseNotes>
2930
<PackageTags>akka;actors;actor model;Akka;concurrency;test</PackageTags>
3031
<PackageProjectUrl>https://github.com/akkadotnet/Akka.MultiNodeTestRunner</PackageProjectUrl>
3132
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
32-
<PackageIcon>icon.png</PackageIcon>
33+
<PackageIcon>akkalogo.png</PackageIcon>
3334
<PackageReadmeFile>README.md</PackageReadmeFile>
3435
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3536
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<!-- App dependencies -->
77
<ItemGroup>
88
<PackageVersion Include="Akka.Cluster.TestKit" Version="1.5.39" />
9+
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
910
<PackageVersion Include="TeamCity.ServiceMessages" Version="4.1.1" />
1011
<PackageVersion Include="System.CodeDom" Version="9.0.4" />
1112
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
1213
<PackageVersion Include="xunit.runner.utility" Version="2.8.1" />
14+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
1315
</ItemGroup>
1416
<!-- Test dependencies -->
1517
<ItemGroup>

NuGet.Config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
<packageSources>
7+
<clear />
8+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
9+
</packageSources>
10+
</configuration>

akkalogo.png

16.7 KB
Loading

appsettings.json

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

build-system/azure-pipeline.template.yaml

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,83 @@ parameters:
22
name: ''
33
displayName: ''
44
vmImage: ''
5-
scriptFileName: ''
6-
scriptArgs: 'all'
5+
outputDirectory: ''
6+
artifactName: ''
77
timeoutInMinutes: 120
88

99
jobs:
1010
- job: ${{ parameters.name }}
1111
displayName: ${{ parameters.displayName }}
1212
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
13+
1314
pool:
1415
vmImage: ${{ parameters.vmImage }}
16+
1517
steps:
16-
- task: UseDotNet@2
17-
displayName: 'Use .NET 8 SDK 8.0.x'
18-
inputs:
19-
version: 8.0.x
20-
- task: UseDotNet@2
21-
displayName: 'Use .NET Core Runtime 6.0.x'
22-
inputs:
23-
packageType: runtime
24-
version: 6.0.x
2518
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
2619
clean: false # whether to fetch clean each time
2720
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
2821
persistCredentials: true
29-
# Linux or macOS
30-
- task: Bash@3
31-
displayName: Linux / OSX Build
22+
23+
- task: UseDotNet@2
24+
displayName: 'Use .NET'
3225
inputs:
33-
filePath: ${{ parameters.scriptFileName }}
34-
arguments: ${{ parameters.scriptArgs }}
35-
continueOnError: true
36-
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
37-
# Windows
38-
- task: BatchScript@1
39-
displayName: Windows Build
26+
packageType: 'sdk'
27+
useGlobalJson: true
28+
29+
- pwsh: |
30+
.\build.ps1
31+
displayName: 'Update Release Notes'
32+
continueOnError: false
33+
34+
- task: DotNetCoreCLI@2
35+
displayName: Build
4036
inputs:
41-
filename: ${{ parameters.scriptFileName }}
42-
arguments: ${{ parameters.scriptArgs }}
43-
continueOnError: true
44-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
37+
command: 'build'
38+
arguments: '-c Release'
39+
continueOnError: false
40+
41+
- script: dotnet test -c Release --no-build --logger:trx --collect:"XPlat Code Coverage" --results-directory TestResults --settings coverlet.runsettings
42+
displayName: 'Run tests'
43+
continueOnError: true # Allow continuation even if tests fail
44+
4545
- task: PublishTestResults@2
4646
inputs:
47-
testRunner: VSTest
47+
testResultsFormat: VSTest
4848
testResultsFiles: '**/*.trx' #TestResults folder usually
4949
testRunTitle: ${{ parameters.name }}
5050
mergeTestResults: true
51-
- task: CopyFiles@2
52-
displayName: 'Copy Build Output'
51+
failTaskOnFailedTests: false
52+
publishRunAttachments: true
53+
54+
- task: reportgenerator@5
55+
displayName: ReportGenerator
56+
condition: always() # Run this step regardless of previous step outcomes
57+
continueOnError: true
5358
inputs:
54-
sourceFolder: ${{ parameters.outputDirectory }}
55-
contents: '**\*'
56-
targetFolder: $(Build.ArtifactStagingDirectory)
57-
continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false'
59+
reports: '$(Build.SourcesDirectory)/TestResults/**/*.cobertura.xml'
60+
targetdir: '$(Build.SourcesDirectory)/coveragereport'
61+
reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges'
62+
assemblyfilters: '-xunit*'
63+
publishCodeCoverageResults: true
64+
65+
- publish: $(Build.SourcesDirectory)/coveragereport
66+
displayName: 'Publish Coverage Report'
67+
condition: and(always(), eq(variables['Agent.OS'], 'Windows_NT'))
68+
continueOnError: true
69+
artifact: 'CoverageReports'
70+
71+
- script: dotnet pack -c Release -o $(Build.ArtifactStagingDirectory)/nuget
72+
displayName: 'Create packages'
73+
5874
- task: PublishBuildArtifacts@1
75+
displayName: 'Publish artifacts'
5976
inputs:
60-
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
61-
artifactName: ${{ parameters.artifactName }}
77+
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nuget'
78+
ArtifactName: 'nuget'
79+
publishLocation: 'Container'
80+
6281
- script: 'echo 1>&2'
6382
failOnStderr: true
6483
displayName: 'If above is partially succeeded, then fail'
65-
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
84+
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')

build-system/pr-validation.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@ jobs:
2020
name: 'windows_pr'
2121
displayName: 'Windows PR Validation'
2222
vmImage: 'windows-latest'
23-
scriptFileName: build.cmd
24-
scriptArgs: all
2523
outputDirectory: 'bin/nuget'
2624
artifactName: 'nuget_pack-$(Build.BuildId)'
25+
2726
- template: azure-pipeline.template.yaml
2827
parameters:
2928
name: 'linux_pr'
3029
displayName: 'Linux PR Validation'
3130
vmImage: 'ubuntu-latest'
32-
scriptFileName: ./build.sh
33-
scriptArgs: all
3431
outputDirectory: 'bin/nuget'
35-
artifactName: 'nuget_pack-$(Build.BuildId)'
32+
artifactName: 'nuget_pack-$(Build.BuildId)'

0 commit comments

Comments
 (0)