Skip to content

Commit c7e0332

Browse files
authored
Remove FAKE F# build scripts (#395)
* Remove FAKE F# build scripts * Re-add windows-pr-validation.yaml * Add missing coverlet.runsettings * Disable net FX and netcoreapp3.1 target for linux test build * Bump test framework target to net8.0 * Drop netcoreapp3.1 test framework target
1 parent 94bdac8 commit c7e0332

22 files changed

+338
-730
lines changed

Hyperion.sln

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperion", "src\Hyperion\Hy
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2F3D4EC4-3A41-48C2-9DEA-0510B0FF89B4}"
99
ProjectSection(SolutionItems) = preProject
10-
build.cmd = build.cmd
11-
build.fsx = build.fsx
1210
build.ps1 = build.ps1
13-
build.sh = build.sh
1411
README.md = README.md
1512
RELEASE_NOTES.md = RELEASE_NOTES.md
13+
global.json = global.json
14+
NuGet.Config = NuGet.Config
15+
src\common.props = src\common.props
1616
EndProjectSection
1717
EndProject
1818
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Hyperion.Tests.FSharpData", "src\Hyperion.Tests.FSharpData\Hyperion.Tests.FSharpData.fsproj", "{1E406A85-C7F5-4F62-9D72-88C67FF2D743}"
@@ -25,6 +25,21 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperion.Akka.Integration.T
2525
EndProject
2626
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hyperion.API.Tests", "src\Hyperion.API.Tests\Hyperion.API.Tests.csproj", "{767FBBD2-869C-4AAD-ABF4-F23EC0D381AA}"
2727
EndProject
28+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{CFD6961A-9F66-4BF6-AE27-EE5B5013E6B1}"
29+
ProjectSection(SolutionItems) = preProject
30+
scripts\bumpVersion.ps1 = scripts\bumpVersion.ps1
31+
scripts\getReleaseNotes.ps1 = scripts\getReleaseNotes.ps1
32+
EndProjectSection
33+
EndProject
34+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build-system", "build-system", "{A5AA04A4-1B47-40CF-BDFB-08ADB09BF647}"
35+
ProjectSection(SolutionItems) = preProject
36+
build-system\azure-pipeline.template.yaml = build-system\azure-pipeline.template.yaml
37+
build-system\nightly-builds.yaml = build-system\nightly-builds.yaml
38+
build-system\pr-validation.yaml = build-system\pr-validation.yaml
39+
build-system\windows-release.yaml = build-system\windows-release.yaml
40+
build-system\windows-pr-validation.yaml = build-system\windows-pr-validation.yaml
41+
EndProjectSection
42+
EndProject
2843
Global
2944
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3045
Debug|Any CPU = Debug|Any CPU
@@ -62,4 +77,8 @@ Global
6277
GlobalSection(ExtensibilityGlobals) = postSolution
6378
SolutionGuid = {B1C59E88-286D-4AD0-B5FC-94C8F95BF0FA}
6479
EndGlobalSection
80+
GlobalSection(NestedProjects) = preSolution
81+
{CFD6961A-9F66-4BF6-AE27-EE5B5013E6B1} = {2F3D4EC4-3A41-48C2-9DEA-0510B0FF89B4}
82+
{A5AA04A4-1B47-40CF-BDFB-08ADB09BF647} = {2F3D4EC4-3A41-48C2-9DEA-0510B0FF89B4}
83+
EndGlobalSection
6584
EndGlobal

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>

RELEASE_NOTES.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
### 0.12.2 March 31 2022 ####
1+
#### 0.12.2 March 31 2022 ####
22

33
* Fix [deserialization type cache was shared between multiple serializer instances](https://github.com/akkadotnet/Hyperion/pull/306)
44

5-
### 0.12.1 March 23 2022 ####
5+
#### 0.12.1 March 23 2022 ####
66

77
* Fix disallow-unsafe-type Akka.NET settings and harden unsafe type detection [301](https://github.com/akkadotnet/Hyperion/pull/301)
88
* Bump [Akka version from 1.4.34 to 1.4.35](https://github.com/akkadotnet/akka.net/releases/tag/1.4.35)
99

10-
### 0.12.0 January 12 2022 ####
10+
#### 0.12.0 January 12 2022 ####
1111

1212
* Allow explicit control over which types can be deserialized [#281](https://github.com/akkadotnet/Hyperion/pull/281)
1313

@@ -25,12 +25,12 @@ var serializer = new Serializer(options);
2525

2626
For complete documentation, please read the [readme on filtering types for secure deserialization.](https://github.com/akkadotnet/Hyperion#whitelisting-types-on-deserialization)
2727

28-
### 0.11.2 October 7 2021 ####
28+
#### 0.11.2 October 7 2021 ####
2929
* Fix exception thrown during deserialization when preserve object reference was turned on
3030
and a surrogate instance was inserted into a collection multiple times. [#264](https://github.com/akkadotnet/Hyperion/pull/264)
3131
* Add support for AggregateException serialization. [#266](https://github.com/akkadotnet/Hyperion/pull/266)
3232

33-
### 0.11.1 August 17 2021 ####
33+
#### 0.11.1 August 17 2021 ####
3434
* Add [unsafe deserialization type blacklist](https://github.com/akkadotnet/Hyperion/pull/242)
3535
* Bump [Akka version from 1.4.21 to 1.4.23](https://github.com/akkadotnet/Hyperion/pull/246)
3636

@@ -60,7 +60,7 @@ The unsafe types that are currently blocked are:
6060
- System.Diagnostics.Process
6161
- System.Management.IWbemClassObjectFreeThreaded
6262

63-
### 0.11.0 July 8 2021 ####
63+
#### 0.11.0 July 8 2021 ####
6464
* [Fix array of user defined structs serialization failure](https://github.com/akkadotnet/Hyperion/pull/235)
6565
* [Remove dynamic keyword usage from array serializer](https://github.com/akkadotnet/Hyperion/pull/139)
6666
* [Change field ordering to ordinal](https://github.com/akkadotnet/Hyperion/pull/236)
@@ -73,9 +73,9 @@ that are serialized using the Hyperion serializer.
7373
Please report any serialization problem that occurs after an upgrade to this version at the
7474
[issue tracker](https://github.com/akkadotnet/Hyperion/issues)
7575

76-
### 0.10.2 June 30 2021 ####
76+
#### 0.10.2 June 30 2021 ####
7777
* [Update Akka version to 1.4.21](https://github.com/akkadotnet/akka.net/releases/tag/1.4.21)
7878
* [Add exception rethrow to help with debugging](https://github.com/akkadotnet/Hyperion/pull/229)
7979

80-
### 0.10.1 April 20 2021 ####
80+
#### 0.10.1 April 20 2021 ####
8181
* [Fix SerializerOptions constructor backward compatibility issue with Akka.NET](https://github.com/akkadotnet/Hyperion/pull/214)
Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,108 @@
11
parameters:
22
name: ''
3+
displayName: ''
34
vmImage: ''
4-
scriptFileName: ''
5-
scriptArgs: 'all'
5+
outputDirectory: ''
6+
artifactName: ''
67
timeoutInMinutes: 120
7-
outputDirectory: 'bin/nuget'
88

99
jobs:
1010
- job: ${{ parameters.name }}
11+
displayName: ${{ parameters.displayName }}
1112
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
13+
1214
pool:
1315
vmImage: ${{ parameters.vmImage }}
16+
1417
steps:
1518
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
1619
clean: false # whether to fetch clean each time
1720
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
1821
persistCredentials: true
22+
1923
- task: UseDotNet@2
20-
displayName: 'Use .NET 5 SDK 5.0.408'
24+
displayName: 'Use .NET'
2125
inputs:
22-
version: 5.0.408
26+
packageType: 'sdk'
27+
useGlobalJson: true
28+
2329
- task: UseDotNet@2
24-
displayName: 'Use .NET Core Runtime 3.1.32'
30+
displayName: "Use .NET 8 runtime"
2531
inputs:
2632
packageType: runtime
27-
version: 3.1.32
28-
# Linux or macOS
29-
- task: Bash@3
30-
displayName: Linux / OSX Build
31-
inputs:
32-
filePath: ${{ parameters.scriptFileName }}
33-
arguments: ${{ parameters.scriptArgs }}
34-
continueOnError: true
35-
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
36-
# Windows
37-
- task: BatchScript@1
38-
displayName: Windows Build
39-
inputs:
40-
filename: ${{ parameters.scriptFileName }}
41-
arguments: ${{ parameters.scriptArgs }}
42-
continueOnError: true
43-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
33+
version: 8.x
34+
35+
- script: dotnet tool restore
36+
displayName: 'Restore dotnet tools'
37+
38+
- pwsh: |
39+
.\build.ps1
40+
displayName: 'Update Release Notes'
41+
continueOnError: false
42+
43+
- script: dotnet build -c Release
44+
displayName: 'dotnet build'
45+
continueOnError: false
46+
47+
- pwsh: |
48+
Get-ChildItem `
49+
-Recurse `
50+
-File `
51+
-Include '*.Tests.csproj' `
52+
-Exclude '*examples*', '*benchmarks*' `
53+
| ForEach-Object { `
54+
dotnet test -c Release --no-build --logger:trx --collect:"XPlat Code Coverage" --results-directory TestResults --settings coverlet.runsettings $_.FullName `
55+
}
56+
displayName: 'Run tests'
57+
continueOnError: true # Allow continuation even if tests fail
58+
4459
- task: PublishTestResults@2
4560
inputs:
46-
testRunner: VSTest
61+
testResultsFormat: VSTest
4762
testResultsFiles: '**/*.trx' #TestResults folder usually
4863
testRunTitle: ${{ parameters.name }}
4964
mergeTestResults: true
50-
- task: CopyFiles@2
51-
displayName: 'Copy Build Output'
65+
failTaskOnFailedTests: false
66+
publishRunAttachments: true
67+
68+
- pwsh: |
69+
$coverageFiles = Get-ChildItem -Path "$(Build.SourcesDirectory)/TestResults" -Filter "*.cobertura.xml" -Recurse
70+
$hasCoverageFiles = $coverageFiles.Count -gt 0
71+
Write-Host "##vso[task.setvariable variable=HasCoverageFiles]$hasCoverageFiles"
72+
displayName: 'Check for Coverage Files'
73+
condition: always()
74+
continueOnError: true
75+
76+
- task: reportgenerator@5
77+
displayName: ReportGenerator
78+
# Only run if coverage files exist
79+
condition: and(always(), eq(variables['HasCoverageFiles'], 'True'))
80+
continueOnError: true
5281
inputs:
53-
sourceFolder: ${{ parameters.outputDirectory }}
54-
contents: '**\*'
55-
targetFolder: $(Build.ArtifactStagingDirectory)
56-
continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false'
82+
reports: '$(Build.SourcesDirectory)/TestResults/**/*.cobertura.xml'
83+
targetdir: '$(Build.SourcesDirectory)/coveragereport'
84+
reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges'
85+
assemblyfilters: '-xunit*'
86+
publishCodeCoverageResults: true
87+
88+
- publish: $(Build.SourcesDirectory)/coveragereport
89+
displayName: 'Publish Coverage Report'
90+
# Only run if coverage files exist
91+
condition: and(always(), eq(variables['HasCoverageFiles'], 'True'))
92+
continueOnError: true
93+
artifact: 'CoverageReports-$(Agent.OS)-$(Build.BuildId)'
94+
95+
- script: dotnet pack -c Release --no-build -o $(Build.ArtifactStagingDirectory)/nuget
96+
displayName: 'Create packages'
97+
5798
- task: PublishBuildArtifacts@1
99+
displayName: 'Publish artifacts'
58100
inputs:
59-
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
60-
artifactName: ${{ parameters.name }}
101+
PathtoPublish: '$(Build.ArtifactStagingDirectory)/nuget'
102+
ArtifactName: 'nuget'
103+
publishLocation: 'Container'
104+
61105
- script: 'echo 1>&2'
62106
failOnStderr: true
63107
displayName: 'If above is partially succeeded, then fail'
64-
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')
108+
condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues')

build-system/nightly-builds.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
33

44
pool:
5-
vmImage: windows-2019
5+
vmImage: windows-latest
66
demands: Cmd
77

88
trigger: none
@@ -19,8 +19,19 @@ variables:
1919
- group: nugetKeys #create this group with SECRET variables `nugetKey`
2020

2121
steps:
22-
- task: BatchScript@1
23-
displayName: 'FAKE Build'
24-
inputs:
25-
filename: build.cmd
26-
arguments: 'Nuget nugetprerelease=dev nugetpublishurl=$(nightlyUrl) nugetkey=$(nightlyKey)'
22+
- task: UseDotNet@2
23+
displayName: 'Use .NET SDK from global.json'
24+
inputs:
25+
useGlobalJson: true
26+
27+
- powershell: ./build.ps1
28+
displayName: 'Update Release Notes'
29+
30+
# Pack with version suffix for nightly builds
31+
- powershell: |
32+
$timestamp = Get-Date -Format "yyyyMMddHHmmss"
33+
dotnet pack -c Release -p:VersionSuffix=beta$timestamp -o $(Build.ArtifactStagingDirectory)/nuget
34+
displayName: 'Create packages'
35+
36+
- script: dotnet nuget push "$(Build.ArtifactStagingDirectory)\nuget\*.nupkg" --api-key $(nightlyKey) --source $(nightlyUrl) --skip-duplicate
37+
displayName: 'Publish to Nightly Feed'

build-system/pr-validation.yaml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Pull request validation for Windows against the `dev` and `master` branches
2-
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
31
trigger:
42
branches:
53
include:
@@ -11,29 +9,21 @@ pr:
119
branches:
1210
include: [ dev, master ] # branch names which will trigger a build
1311

14-
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
12+
name: $(SourceBranchName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
1513

1614
jobs:
1715
- template: azure-pipeline.template.yaml
1816
parameters:
1917
name: 'windows_pr'
2018
displayName: 'Windows PR Validation'
2119
vmImage: 'windows-latest'
22-
scriptFileName: build.cmd
23-
scriptArgs: all
24-
25-
- template: azure-pipeline.template.yaml
26-
parameters:
27-
name: 'linux_pr_net_core'
28-
displayName: 'Linux PR Validation (netcoreapp3.1)'
29-
vmImage: 'ubuntu-latest'
30-
scriptFileName: ./build.sh
31-
scriptArgs: runTestsNetCore
32-
20+
outputDirectory: 'bin/nuget'
21+
artifactName: 'nuget_pack-$(Build.BuildId)'
22+
3323
- template: azure-pipeline.template.yaml
3424
parameters:
35-
name: 'linux_pr_net_5'
36-
displayName: 'Linux PR Validation (net5.0)'
25+
name: 'linux_pr'
26+
displayName: 'Linux PR Validation'
3727
vmImage: 'ubuntu-latest'
38-
scriptFileName: ./build.sh
39-
scriptArgs: runTestsNet
28+
outputDirectory: 'bin/nuget'
29+
artifactName: 'nuget_pack-$(Build.BuildId)'
Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Pull request validation for Windows against the `dev` and `master` branches
2-
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
31
trigger:
42
branches:
53
include:
@@ -11,28 +9,21 @@ pr:
119
branches:
1210
include: [ dev, master ] # branch names which will trigger a build
1311

14-
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
12+
name: $(SourceBranchName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
1513

1614
jobs:
17-
- template: azure-pipeline.template.yaml
18-
parameters:
19-
name: Windows
20-
vmImage: 'windows-latest'
21-
scriptFileName: build.cmd
22-
scriptArgs: all
15+
- template: azure-pipeline.template.yaml
16+
parameters:
17+
name: 'windows_pr'
18+
displayName: 'Windows PR Validation'
19+
vmImage: 'windows-latest'
20+
outputDirectory: 'bin/nuget'
21+
artifactName: 'nuget_pack-$(Build.BuildId)'
2322

24-
- template: azure-pipeline.template.yaml
25-
parameters:
26-
name: 'linux_pr_net_core'
27-
displayName: 'Linux PR Validation (netcoreapp3.1)'
28-
vmImage: 'ubuntu-latest'
29-
scriptFileName: ./build.sh
30-
scriptArgs: runTestsNetCore
31-
32-
- template: azure-pipeline.template.yaml
33-
parameters:
34-
name: 'linux_pr_net_5'
35-
displayName: 'Linux PR Validation (net5.0)'
36-
vmImage: 'ubuntu-latest'
37-
scriptFileName: ./build.sh
38-
scriptArgs: runTestsNet
23+
- template: azure-pipeline.template.yaml
24+
parameters:
25+
name: 'linux_pr'
26+
displayName: 'Linux PR Validation'
27+
vmImage: 'ubuntu-latest'
28+
outputDirectory: 'bin/nuget'
29+
artifactName: 'nuget_pack-$(Build.BuildId)'

0 commit comments

Comments
 (0)