Skip to content

Commit

Permalink
update buildchain to use .NET 8 SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Jan 3, 2024
1 parent 95dd4f1 commit 2d0ccc6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup .NET 6.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: make script executable
run: chmod u+x build.sh
- name: Build and test
Expand All @@ -28,9 +28,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup .NET 6.0
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: Build and test
run: ./build.cmd runTests
5 changes: 4 additions & 1 deletion build/BasicTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ let buildSolution =
Properties = ([
"warnon", "3390"
])
DisableInternalBinLog = true
}
{
p with
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
}

Expand All @@ -87,14 +89,15 @@ let build = BuildTask.create "Build" [clean; buildOntologies] {
"InformationalVersion", pInfo.AssemblyInformationalVersion
"warnon", "3390"
])
DisableInternalBinLog = true
}
{
p with
MSBuildParams = msBuildParams
}
// Use this if you want to speed up your build. Especially helpful in large projects
// Ensure that the order in your project list is correct (e.g. projects that are depended on are built first)
|> DotNet.Options.withCustomParams (Some "--no-dependencies")
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
)
)
}
Expand Down
8 changes: 6 additions & 2 deletions build/PackageTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let pack = BuildTask.create "Pack" [ clean; build; runTests ] {
"TargetsForTfmSpecificContentInPackage", "" //https://github.com/dotnet/fsharp/issues/12320
]
@ p.MSBuildParams.Properties)
DisableInternalBinLog = true
}
| _ ->
{ p.MSBuildParams with
Expand All @@ -42,6 +43,7 @@ let pack = BuildTask.create "Pack" [ clean; build; runTests ] {
"TargetsForTfmSpecificContentInPackage", "" //https://github.com/dotnet/fsharp/issues/12320
]
@ p.MSBuildParams.Properties)
DisableInternalBinLog = true
}


Expand All @@ -50,7 +52,7 @@ let pack = BuildTask.create "Pack" [ clean; build; runTests ] {
OutputPath = Some pkgDir
NoBuild = true
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies")
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
)
else
failwith "aborted"
Expand Down Expand Up @@ -85,6 +87,7 @@ let packPrerelease =
"PackageReleaseNotes", (r.Notes |> String.concat "\r\n")
"TargetsForTfmSpecificContentInPackage", "" //https://github.com/dotnet/fsharp/issues/12320
])
DisableInternalBinLog = true
}
| _ ->
{ p.MSBuildParams with
Expand All @@ -95,6 +98,7 @@ let packPrerelease =
"InformationalVersion", pInfo.AssemblyInformationalVersion
"TargetsForTfmSpecificContentInPackage", "" //https://github.com/dotnet/fsharp/issues/12320
])
DisableInternalBinLog = true
}

{ p with
Expand All @@ -103,7 +107,7 @@ let packPrerelease =
MSBuildParams = msBuildParams
NoBuild = true
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies")
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
)
else
failwith "aborted"
Expand Down
14 changes: 9 additions & 5 deletions build/TestTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ let buildTests =
let proj = pInfo.ProjFile
proj
|> DotNet.build (fun p ->
p
// Use this if you want to speed up your build. Especially helpful in large projects
// Ensure that the order in your project list is correct (e.g. projects that are depended on are built first)
|> DotNet.Options.withCustomParams (Some "--no-dependencies")
{
p with
MSBuildParams = { p.MSBuildParams with DisableInternalBinLog = true}
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
)
)
}
Expand All @@ -30,7 +31,10 @@ let runTests = BuildTask.create "RunTests" [clean; build; buildTests] {
{ testParams with
Logger = Some "console;verbosity=detailed"
Configuration = DotNet.BuildConfiguration.fromString configuration
MSBuildParams = { testParams.MSBuildParams with DisableInternalBinLog = true }
NoBuild = true
})
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
testProjectInfo.ProjFile)
}
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
8 changes: 4 additions & 4 deletions src/ARCTokenization/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
".NETStandard,Version=v2.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[6.0.7, )",
"resolved": "6.0.7",
"contentHash": "e6wGrq5smV3Yk2fBE/Y0nBG5oFyF59k5Je0a0QDydUpg6liyaafGjD3xvutciKepCP2knspZ/sWViC/F1OyyQQ=="
"requested": "[8.0.100, )",
"resolved": "8.0.100",
"contentHash": "ZOVZ/o+jI3ormTZOa28Wh0tSRoyle1f7lKFcUN61sPiXI7eDZu8eSveFybgTeyIEyW0ujjp31cp7GOglDgsNEg=="
},
"FSharpAux.Core": {
"type": "Direct",
Expand Down Expand Up @@ -188,7 +188,7 @@
"controlledvocabulary": {
"type": "Project",
"dependencies": {
"FSharp.Core": "[6.0.7, )",
"FSharp.Core": "[8.0.100, )",
"FSharpAux.Core": "[2.0.0, 2.0.0]"
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/ControlledVocabulary/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
".NETStandard,Version=v2.0": {
"FSharp.Core": {
"type": "Direct",
"requested": "[6.0.7, )",
"resolved": "6.0.7",
"contentHash": "e6wGrq5smV3Yk2fBE/Y0nBG5oFyF59k5Je0a0QDydUpg6liyaafGjD3xvutciKepCP2knspZ/sWViC/F1OyyQQ=="
"requested": "[8.0.100, )",
"resolved": "8.0.100",
"contentHash": "ZOVZ/o+jI3ormTZOa28Wh0tSRoyle1f7lKFcUN61sPiXI7eDZu8eSveFybgTeyIEyW0ujjp31cp7GOglDgsNEg=="
},
"FSharpAux.Core": {
"type": "Direct",
Expand Down

0 comments on commit 2d0ccc6

Please sign in to comment.