Skip to content

Commit 6812f2c

Browse files
committed
CI,scripts,snap,Frontend.Maui: use .NET 8
Switch to using .NET 8 for all frontends. Use Maui 8 on Gtk. This unifies .NET versions and gets rid of .NET 6, which is nearing end of suport anyway. Update Microsoft.Extensions.DependencyInjection to v 8.0.0. This iss needed to avoid error: ``` error NU1605: Warning As Error: Detected package downgrade: Microsoft.Extensions.DependencyInjection from 8.0.0 to 6.0.0. Reference the package directly from the project to select a different version. ``` Install maui workloads on windows--dotnet8-* lanes so that Maui/Android can be built. Call fsxc with DOTNET_ROLL_FORWARD=Major to allow it to run under newer .NET version (we use .NET8 now, and fsxc is compiled for .NET6).
1 parent 1e2b5e9 commit 6812f2c

File tree

10 files changed

+54
-44
lines changed

10 files changed

+54
-44
lines changed

.github/workflows/CI.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
env:
1313
# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
1414
FSXC_VERSION: 0.5.9.1
15-
GtkSharpVersion: 3.24.24.95
16-
DotNetVersionForMauiGtk: 6.0.400
15+
GtkSharpVersion: 3.24.24.117-develop
16+
DotNetVersionForMauiGtk: 8.0.200
1717

1818
# FIXME: figure out why we need to clean after make if we
1919
# want 'make strict' target to really happen without
@@ -120,16 +120,16 @@ jobs:
120120
- name: integration tests
121121
run: make update-servers
122122

123-
macOS--dotnet6-only:
123+
macOS--dotnet8-only:
124124
runs-on: macOS-13
125125
steps:
126126
- uses: actions/checkout@v1
127127
with:
128128
submodules: false
129-
- name: Setup .NET SDK 6.0.x
129+
- name: Setup .NET SDK 8.0.x
130130
uses: actions/[email protected]
131131
with:
132-
dotnet-version: '6.0.113'
132+
dotnet-version: '8.0.300'
133133
- name: HACK to emulate mono uninstall
134134
run: sudo rm -f `which mono` && sudo rm -f `which msbuild`
135135
- name: configure
@@ -151,19 +151,23 @@ jobs:
151151
dotnet new tool-manifest
152152
153153
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
154+
# make it work with newer .NET
155+
export DOTNET_ROLL_FORWARD=Major
154156
155157
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
156158
157-
windows--dotnet6-and-legacyFramework:
159+
windows--dotnet8-and-legacyFramework:
158160
runs-on: windows-latest
159161
steps:
160162
- uses: actions/checkout@v1
161163
with:
162164
submodules: false
163-
- name: Setup .NET SDK 6.0.x
165+
- name: Setup .NET SDK 8.0.x
164166
uses: actions/[email protected]
165167
with:
166-
dotnet-version: '6.0.x'
168+
dotnet-version: '8.0.x'
169+
- name: install maui workloads
170+
run: dotnet workload install maui
167171
- name: configure
168172
run: .\configure.bat
169173
- name: build in DEBUG mode
@@ -184,6 +188,8 @@ jobs:
184188
dotnet new tool-manifest
185189
186190
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
191+
# make it work with newer .NET
192+
export DOTNET_ROLL_FORWARD=Major
187193
188194
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
189195
@@ -210,18 +216,20 @@ jobs:
210216
- name: integration tests
211217
run: .\make update-servers
212218

213-
windows--dotnet6-only:
219+
windows--dotnet8-only:
214220
runs-on: windows-latest
215221
steps:
216222
- uses: actions/checkout@v1
217223
with:
218224
submodules: false
219-
- name: Setup .NET SDK 6.0.x
225+
- name: Setup .NET SDK 8.0.x
220226
uses: actions/[email protected]
221227
with:
222-
dotnet-version: '6.0.113'
228+
dotnet-version: '8.0.x'
223229
- name: HACK to emulate legacy .NETFramework uninstall
224230
run: del $(& "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -find MSBuild\\**\\Bin\\MSBuild.exe)
231+
- name: install maui workloads
232+
run: dotnet workload install maui
225233
- name: configure
226234
run: .\configure.bat
227235
- name: build in DEBUG mode
@@ -242,6 +250,8 @@ jobs:
242250
dotnet new tool-manifest
243251
244252
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
253+
# make it work with newer .NET
254+
export DOTNET_ROLL_FORWARD=Major
245255
246256
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
247257
@@ -280,6 +290,8 @@ jobs:
280290
dotnet new tool-manifest
281291
282292
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
293+
# make it work with newer .NET
294+
export DOTNET_ROLL_FORWARD=Major
283295
284296
# ignore scripts/fsx submodule as compiling scripts there will result in error
285297
find . -type f -name "*.fsx" ! -path "./scripts/fsx/*" | xargs -t -I {} dotnet fsxc {}
@@ -318,6 +330,8 @@ jobs:
318330
dotnet new tool-manifest
319331
320332
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
333+
# make it work with newer .NET
334+
export DOTNET_ROLL_FORWARD=Major
321335
322336
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
323337
@@ -361,7 +375,7 @@ jobs:
361375
- name: integration tests
362376
run: make update-servers
363377

364-
linux-vanilla--stockdotnet6-only:
378+
linux-vanilla--stockdotnet8-only:
365379
runs-on: ubuntu-22.04
366380
container:
367381
image: "ubuntu:22.04"
@@ -374,7 +388,7 @@ jobs:
374388
- name: install sudo
375389
run: apt update && apt install --yes sudo
376390
- name: install all dependencies
377-
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6
391+
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8
378392

379393
# workaround for https://github.com/actions/runner/issues/2033
380394
- name: ownership workaround
@@ -399,10 +413,12 @@ jobs:
399413
dotnet new tool-manifest
400414
401415
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
416+
# make it work with newer .NET
417+
export DOTNET_ROLL_FORWARD=Major
402418
403419
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
404420
405-
linux-vanilla--stockdotnet6-and-newmono:
421+
linux-vanilla--stockdotnet8-and-newmono:
406422
runs-on: ubuntu-22.04
407423
container:
408424
image: "ubuntu:22.04"
@@ -415,7 +431,7 @@ jobs:
415431
- name: install sudo
416432
run: apt update && apt install --yes sudo
417433
- name: install all dependencies
418-
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6
434+
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8
419435
- name: install last version of mono (Microsoft APT repositories)
420436
run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh
421437

@@ -442,10 +458,12 @@ jobs:
442458
dotnet new tool-manifest
443459
444460
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
461+
# make it work with newer .NET
462+
export DOTNET_ROLL_FORWARD=Major
445463
446464
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
447465
448-
linux-vanilla--stockdotnet6-and-stockmono:
466+
linux-vanilla--stockdotnet8-and-stockmono:
449467
runs-on: ubuntu-22.04
450468
container:
451469
image: "ubuntu:22.04"
@@ -458,7 +476,7 @@ jobs:
458476
- name: install sudo
459477
run: apt update && apt install --yes sudo
460478
- name: install all dependencies
461-
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 mono-xbuild fsharp
479+
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8 mono-xbuild fsharp
462480
- name: install GTK libs (dependency of GTK frontend)
463481
run: sudo apt install --yes libgtk2.0-cil-dev
464482
# workaround for https://github.com/actions/runner/issues/2033
@@ -484,6 +502,8 @@ jobs:
484502
dotnet new tool-manifest
485503
486504
dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
505+
# make it work with newer .NET
506+
export DOTNET_ROLL_FORWARD=Major
487507
488508
find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
489509
@@ -537,15 +557,15 @@ jobs:
537557
- linux-github--dotnet-and-newmono
538558
- linux-vanilla--stockmono-only
539559
- linux-vanilla--newmono-only
540-
- linux-vanilla--stockdotnet6-only
541-
- linux-vanilla--stockdotnet6-and-stockmono
542-
- linux-vanilla--stockdotnet6-and-newmono
543-
- windows--dotnet6-and-legacyFramework
560+
- linux-vanilla--stockdotnet8-only
561+
- linux-vanilla--stockdotnet8-and-stockmono
562+
- linux-vanilla--stockdotnet8-and-newmono
563+
- windows--dotnet8-and-legacyFramework
544564
- windows--legacyFramework-only
545-
- windows--dotnet6-only
565+
- windows--dotnet8-only
546566
- macOS--dotnet8-and-mono
547567
- macOS--mono-only
548-
- macOS--dotnet6-only
568+
- macOS--dotnet8-only
549569

550570
steps:
551571
- uses: actions/checkout@v1

dependencies/maui

Submodule maui updated 8422 files

global-net6.json

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

scripts/configure.fsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,7 @@ let version = Misc.GetCurrentVersion(rootDir)
268268
let repoInfo = Git.GetRepoInfo()
269269

270270
if not (List.isEmpty mauiWorkloads) then
271-
let globalJsonFile =
272-
if frontend = "Maui/Gtk" then
273-
"global-net6.json"
274-
else
275-
"global-net8.json"
276-
271+
let globalJsonFile = "global-net8.json"
277272
File.Copy(globalJsonFile, "global.json")
278273

279274
Console.WriteLine()

scripts/make.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ let JustBuild binaryConfig maybeConstant: FrontendApp*FileInfo =
401401
| _ -> FrontendApp.Console
402402
| Some "dotnet", _ when maybeConfigFrontend |> Option.exists (fun value -> value.StartsWith "Maui") ->
403403
if maybeConfigFrontend = Some "Maui/Gtk" then
404-
BuildMauiProject binaryConfig "net6.0-gtk"
404+
BuildMauiProject binaryConfig "net8.0-gtk"
405405
else
406406
BuildMauiProject binaryConfig "net8.0-android"
407407

@@ -457,7 +457,7 @@ let GetPathToFrontend (frontend: FrontendApp) (binaryConfig: BinaryConfig): Dire
457457
"bin",
458458
binaryConfig.ToString()
459459
#if !LEGACY_FRAMEWORK
460-
, "net6.0"
460+
, "net8.0"
461461
#endif
462462
) |> DirectoryInfo
463463

scripts/snap_build_maui.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ set -euxo pipefail
77
# Build GWallet MAUI Gtk project
88
./configure.sh
99
make
10-
dotnet build --configuration=Release --framework=net6.0-gtk ./src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj
11-
dotnet publish --configuration=Release --framework=net6.0-gtk --output=./staging ./src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj
10+
dotnet build --configuration=Release --framework=net8.0-gtk ./src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj
11+
dotnet publish --configuration=Release --framework=net8.0-gtk --output=./staging ./src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj
1212
cp ./scripts/geewallet-maui-gtk.sh ./staging/
1313

1414
rm ./snap/snapcraft.yaml

snap/local/snapcraft_maui.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ parts:
3131
organize:
3232
geewallet-maui-gtk.sh: bin/geewallet-maui-gtk.sh
3333
stage-packages:
34-
- dotnet-runtime-7.0
34+
- dotnet-runtime-8.0
3535
override-build: |
3636
set -ex
3737

src/GWallet.Backend.Tests/GWallet.Backend.Tests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<IsPackable>false</IsPackable>
55
<GenerateProgramFile>false</GenerateProgramFile>
66
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors>

src/GWallet.Frontend.ConsoleApp/GWallet.Frontend.ConsoleApp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66
<ItemGroup>
77
<Compile Include="..\GWallet.Backend\Properties\CommonAssemblyInfo.fs">

src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- NOTE: when making changes to the lines below, maybe remove CheckEolWorkloads tag too -->
55
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
66
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
7-
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net6.0-gtk</TargetFrameworks>
7+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('linux'))">net8.0-gtk</TargetFrameworks>
88
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
99
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
1010

@@ -215,6 +215,7 @@
215215
<ItemGroup>
216216
<PackageReference Include="FSharp.Core" Version="6.0.3" />
217217
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.21" />
218+
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
218219
</ItemGroup>
219220

220221
<ItemGroup Condition="$(TargetPlatformIdentifier) != 'gtk'">

0 commit comments

Comments
 (0)