Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/.github.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ jobs:
run: dotnet publish examples/ecs-aot-smoketest

- name: Invoke AOT
run: ./examples/ecs-aot-smoketest/bin/Release/net9.0/${{ matrix.os.folder }}/publish/${{ matrix.os.binary }}
run: ./examples/ecs-aot-smoketest/bin/Release/net10.0/${{ matrix.os.folder }}/publish/${{ matrix.os.binary }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ build/tools/*
!build/tools/sn/*
!build/tools/ilmerge
!build/*.fsx
!build/*.fsx
!build/*.ps1
!build/*.nuspec
!build/*.png
Expand Down Expand Up @@ -79,4 +78,6 @@ project.lock.json
src/packages/
BenchmarkDotNet.Artifacts

html_docs
html_docs

.artifacts
11 changes: 8 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@
</PropertyGroup>

<PropertyGroup>
<MinVerDefaultPreReleasePhase>canary</MinVerDefaultPreReleasePhase>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerDefaultPreReleaseIdentifiers>canary.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerMinimumMajorMinor>0.2</MinVerMinimumMajorMinor>

<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DefineConstants Condition="'$(TargetFramework)'=='net462'">$(DefineConstants);FULLFRAMEWORK</DefineConstants>

<UseArtifactsOutput>true</UseArtifactsOutput>
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.sh))</SolutionRoot>
<ArtifactsPath>$(MSBuildThisFileDirectory).artifacts</ArtifactsPath>

</PropertyGroup>
<ItemGroup>
<PackageReference Include="MinVer" Version="2.3.1" PrivateAssets="all" />
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
<PackageReference Condition="'$(TargetFramework)'=='net462'"
Include="Microsoft.NETFramework.ReferenceAssemblies.net462" Version="1.0.3" PrivateAssets="all"/>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/Paths.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let GenerateApiChanges = false

let Root =
let mutable dir = DirectoryInfo(".")
while dir.GetFiles("*.sln").Length = 0 do dir <- dir.Parent
while dir.GetFiles("*.slnx").Length = 0 do dir <- dir.Parent
Environment.CurrentDirectory <- dir.FullName
dir

Expand Down
19 changes: 4 additions & 15 deletions build/scripts/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ let main argv =
Targets.Setup parsed arguments
let swallowTypes = [ typeof<ProcExecException>; typeof<ExceptionExiter> ]

// temp fix for unit reporting: https://github.com/elastic/apm-pipeline-library/issues/2063
let exitCode =
try
try
Targets.RunTargetsWithoutExiting([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), ":")
0
with
| :? InvalidUsageException as ex ->
Console.WriteLine ex.Message
2
| :? TargetFailedException as ex -> 1
finally
Targets.teardown()

exitCode
task {
return! Targets.RunTargetsAndExitAsync([ target ], (fun e -> swallowTypes |> List.contains (e.GetType())), (fun _ -> ":"), null, null)
} |> Async.AwaitTask |> Async.RunSynchronously
0
36 changes: 14 additions & 22 deletions build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,22 @@ let runningOnWindows = Fake.Core.Environment.isWindows

let execWithTimeout binary args timeout =
let opts =
ExecArguments(binary, args |> List.map (sprintf "\"%s\"") |> List.toArray)
ExecArguments(binary, args |> List.toArray, Timeout=timeout)

let r = Proc.Exec(opts, timeout)

match r.HasValue with
| true -> r.Value
| false -> failwithf "invocation of `%s` timed out" binary
Proc.Exec(opts)

let exec binary args =
execWithTimeout binary args (TimeSpan.FromMinutes 10)
execWithTimeout binary args (Nullable(TimeSpan.FromMinutes 10.))

let private restoreTools = lazy (exec "dotnet" [ "tool"; "restore" ])

let private currentVersion =
lazy
(restoreTools.Value |> ignore
let r = Proc.Start("dotnet", "minver", "-d=canary", "-m=0.1")
let o = r.ConsoleOut |> Seq.find (fun l -> not (l.Line.StartsWith("MinVer:")))
o.Line)
lazy(
restoreTools.Value |> ignore
let r = Proc.Start("dotnet", "minver", "-p", "canary.0", "-m", "0.1")
let o = r.ConsoleOut |> Seq.find (fun l -> not(l.Line.StartsWith "MinVer:"))
o.Line
)

let private currentVersionInformational =
lazy
Expand Down Expand Up @@ -68,15 +65,10 @@ let private runTests (arguments: ParseResults<Arguments>) testMode =
| Unit -> [ "--filter"; "FullyQualifiedName!~IntegrationTests" ]
| Integration -> [ "--filter"; "FullyQualifiedName~IntegrationTests" ]

let os = if runningOnWindows then "win" else "linux"
let junitOutput =
Path.Combine(Paths.Output.FullName, $"junit-%s{os}-%s{mode}-{{assembly}}-{{framework}}-test-results.xml")

let loggerPathArgs = sprintf "LogFilePath=%s" junitOutput
let loggerArg = $"--logger:\"junit;%s{loggerPathArgs};MethodFormat=Class;FailureBodyFormat=Verbose\""
let settingsArg = if runningOnCI then (["-s"; ".ci.runsettings"]) else [];
let loggerArg = $"--logger:GithubActions"
let settingsArg = if runningOnCI then ["-s"; ".ci.runsettings"] else [];

execWithTimeout "dotnet" ([ "test" ] @ filterArg @ settingsArg @ [ "-c"; "RELEASE"; "-m:1"; loggerArg ]) (TimeSpan.FromMinutes 15)
execWithTimeout "dotnet" ([ "test" ] @ filterArg @ settingsArg @ [ "-c"; "RELEASE"; "-m:1"; loggerArg ]) (Nullable(TimeSpan.FromMinutes 15.))
|> ignore

let private test (arguments: ParseResults<Arguments>) =
Expand Down Expand Up @@ -120,8 +112,8 @@ let private generateApiChanges (arguments: ParseResults<Arguments>) =

let firstPath project tfms =
tfms
|> Seq.map (fun tfm -> (tfm, sprintf "directory|src/%s/bin/Release/%s" project Paths.MainTFM))
|> Seq.where (fun (tfm, path) -> File.Exists path)
|> Seq.map (fun tfm -> (tfm, $".artifacts/bin/%s{project}/release_%s{Paths.MainTFM}"))
|> Seq.where (fun (tfm, path) -> Directory.Exists path)
|> Seq.tryHead

nugetPackages
Expand Down
6 changes: 3 additions & 3 deletions build/scripts/scripts.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Argu" Version="6.2.5" />
<PackageReference Include="Bullseye" Version="3.3.0" />
<PackageReference Include="Proc" Version="0.6.2" />
<PackageReference Include="Bullseye" Version="6.0.0" />
<PackageReference Include="Proc" Version="0.11.0" />
<PackageReference Include="Fake.Tools.Git" Version="5.15.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion docs/docs.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>

Expand Down
8 changes: 4 additions & 4 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
"isRoot": true,
"tools": {
"minver-cli": {
"version": "2.3.1",
"version": "6.0.0",
"commands": [
"minver"
],
"rollForward": false
},
"assembly-differ": {
"version": "0.14.0",
"version": "0.17.0",
"commands": [
"assembly-differ"
],
"rollForward": false
},
"release-notes": {
"version": "0.6.0",
"version": "0.10.0",
"commands": [
"release-notes"
],
"rollForward": false
},
"nupkg-validator": {
"version": "0.7.0",
"version": "0.10.1",
"commands": [
"nupkg-validator"
],
Expand Down
Loading
Loading