From 2d0ccc6c899583b9c40cc3848abb2d6e3f3a635e Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Wed, 3 Jan 2024 13:19:09 +0100 Subject: [PATCH] update buildchain to use .NET 8 SDK --- .github/workflows/build-and-test.yml | 8 ++++---- build/BasicTasks.fs | 5 ++++- build/PackageTasks.fs | 8 ++++++-- build/TestTasks.fs | 14 +++++++++----- global.json | 2 +- src/ARCTokenization/packages.lock.json | 8 ++++---- src/ControlledVocabulary/packages.lock.json | 6 +++--- 7 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a3aff65..06b1c24 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -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 @@ -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 diff --git a/build/BasicTasks.fs b/build/BasicTasks.fs index 16f092d..0664a29 100644 --- a/build/BasicTasks.fs +++ b/build/BasicTasks.fs @@ -57,11 +57,13 @@ let buildSolution = Properties = ([ "warnon", "3390" ]) + DisableInternalBinLog = true } { p with MSBuildParams = msBuildParams } + |> DotNet.Options.withCustomParams (Some "-tl") ) } @@ -87,6 +89,7 @@ let build = BuildTask.create "Build" [clean; buildOntologies] { "InformationalVersion", pInfo.AssemblyInformationalVersion "warnon", "3390" ]) + DisableInternalBinLog = true } { p with @@ -94,7 +97,7 @@ let build = BuildTask.create "Build" [clean; buildOntologies] { } // 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") ) ) } diff --git a/build/PackageTasks.fs b/build/PackageTasks.fs index 3ef4e17..db85ee7 100644 --- a/build/PackageTasks.fs +++ b/build/PackageTasks.fs @@ -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 @@ -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 } @@ -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" @@ -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 @@ -95,6 +98,7 @@ let packPrerelease = "InformationalVersion", pInfo.AssemblyInformationalVersion "TargetsForTfmSpecificContentInPackage", "" //https://github.com/dotnet/fsharp/issues/12320 ]) + DisableInternalBinLog = true } { p with @@ -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" diff --git a/build/TestTasks.fs b/build/TestTasks.fs index dd871c0..9a9632f 100644 --- a/build/TestTasks.fs +++ b/build/TestTasks.fs @@ -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") ) ) } @@ -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) } \ No newline at end of file diff --git a/global.json b/global.json index 08fc58c..989a69c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.100", + "version": "8.0.100", "rollForward": "latestMinor" } } \ No newline at end of file diff --git a/src/ARCTokenization/packages.lock.json b/src/ARCTokenization/packages.lock.json index 05cdf5f..b1d1696 100644 --- a/src/ARCTokenization/packages.lock.json +++ b/src/ARCTokenization/packages.lock.json @@ -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", @@ -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]" } } diff --git a/src/ControlledVocabulary/packages.lock.json b/src/ControlledVocabulary/packages.lock.json index 646f542..706d7d2 100644 --- a/src/ControlledVocabulary/packages.lock.json +++ b/src/ControlledVocabulary/packages.lock.json @@ -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",