Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAUI: first steps #279

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a37df96
Add Maui base project
parhamsaremi Jan 15, 2023
8f9c5be
Frontend.Maui: use XF XAML files for building proj
parhamsaremi Jan 15, 2023
bf7b23c
Frontend.Maui: workaround for build fail in VS22
webwarrior-ws Nov 21, 2023
89b2fe0
Frontend.Maui: build Maui on linux using GTK
parhamsaremi Jan 16, 2023
7904186
CI: build Maui (non-GTK) frontend
webwarrior-ws Apr 17, 2024
478fba5
Frontend.Maui: fix window size for gtk
parhamsaremi Feb 15, 2023
ab5e5bf
Frontend.MAUI: add WelcomePage2
webwarrior-ws Mar 1, 2023
4c2ed64
Frontend.Maui: make Linux debugging possible
webwarrior-ws Mar 7, 2023
5b99c92
Frontend.Maui: add LoadingPage
webwarrior-ws Mar 16, 2023
e9d7645
Frontend.Maui: add BalancesPage
webwarrior-ws Apr 3, 2023
95816b4
Frontend.Maui: add ZXing.Net.Maui library
webwarrior-ws Apr 26, 2023
b50759f
Frontend(XF,Maui): added remaining pages
webwarrior-ws Apr 3, 2023
33f6432
Frontend.Maui: Color.Default equivalent for Maui
parhamsaremi May 23, 2023
18e1f3c
GithubCI: use nuget source instead of Github
parhamsaremi May 25, 2023
863c09d
CI: upoad APK as CI artifact
webwarrior-ws Apr 18, 2024
1cddef1
sln,Frontend.Maui: allow proj be built in VS4Mac
knocte Apr 23, 2024
20f47f4
Frontend.Maui: show navigation bar on Android
webwarrior-ws Apr 23, 2024
55ab531
CI,scripts,Frontend.Maui: build MAUI snap
webwarrior-ws Apr 24, 2024
9738880
snap: use dotnet runtime from packages
webwarrior-ws May 20, 2024
7096103
snap: use dotnet-runtime-7.0 in MAUI snap
webwarrior-ws May 20, 2024
0b14ef9
Frontend.Maui: switch to .NET8 for Android
webwarrior-ws May 20, 2024
7442172
Frontend.Maui: update Maui submodule
webwarrior-ws May 9, 2024
ae5c492
Frontend.Maui: show nav toolbar after page load
webwarrior-ws May 21, 2024
a07d797
Frontend.Maui: update Maui submodule
webwarrior-ws May 22, 2024
a33af41
Frontend.Maui: show navigation bar on SendPage
webwarrior-ws May 23, 2024
9673f3b
Frontend.Maui: change from CrossMaui to Mali
webwarrior-ws May 23, 2024
1acfb27
Frontend.Maui: fix title on Gtk
webwarrior-ws May 23, 2024
111ba85
Frontend.Maui: show nav bar page after sending tx
webwarrior-ws May 27, 2024
2552e3c
Frontend.Maui: fix button padding on Gtk
webwarrior-ws May 27, 2024
26171f9
scripts,CI: determine & build frontend in scripts
webwarrior-ws May 23, 2024
e97aea3
Frontend.Maui: fix spacing after "Amount" label
webwarrior-ws May 29, 2024
63d0870
CI,scripts: refactoring of Maui/Gtk builds
webwarrior-ws May 29, 2024
197942f
Frontend.Maui: use fix in Mali for WelcomePage
webwarrior-ws May 23, 2024
de6fa0e
CI,scripts,snap,Frontend.Maui: use .NET 8
webwarrior-ws Jun 13, 2024
260a58c
Frontend.Maui: fix some layout issues on Maui/Gtk
webwarrior-ws Jun 19, 2024
701d8f2
Forntend.Maui: workaround for button width on Gtk
webwarrior-ws Jun 20, 2024
bec7e9c
Frontend(XF,Maui): fix in WelcomePage (datepicker)
webwarrior-ws Jun 26, 2024
24648fd
CI,scripts: upload MAUI snap to snap store
webwarrior-ws May 16, 2024
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
146 changes: 116 additions & 30 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,49 @@ on:
schedule:
- cron: "0 0 * * *"

env:
GtkSharpVersion: 3.24.24.117-develop
DotNetVersionForMauiGtk: 8.0.200

# FIXME: figure out why we need to clean after make if we
# want 'make strict' target to really happen without
# assuming the binaries from previous build are good
# (msbuild bug?)

jobs:
macOS--dotnet6-and-mono:
macOS--dotnet8-and-mono:
runs-on: macOS-12
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 6.0.x
- name: Setup .NET SDK 8.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '6.0.113'
dotnet-version: '8.0.300'
- name: install maui workload
run: dotnet workload install maui
- name: configure
run: ./configure.sh
- name: build in DEBUG mode
run: make
- name: Build Android APK
run: dotnet publish src/GWallet.Frontend.Maui/GWallet.Frontend.Maui.fsproj --framework net8.0-android --configuration Release
# Upload artifact fails with "permission denied" error without this
- name: Fix permissions
run: sudo chmod -R 755 src/GWallet.Frontend.Maui/bin/Release/net8.0-android/publish
- name: Find the APK file's path and name
id: find_apk_file
run: |
FILEPATH=$(ls src/GWallet.Frontend.Maui/bin/Release/net8.0-android/publish/*.apk)
FILENAME=$(basename $FILEPATH)
echo "file_path=$FILEPATH" >> $GITHUB_OUTPUT
echo "file_name=$FILENAME" >> $GITHUB_OUTPUT
- name: Upload APK as CI artifact
uses: actions/upload-artifact@v3
with:
path: ${{ steps.find_apk_file.outputs.file_path }}
name: ${{ steps.find_apk_file.outputs.file_name }}
- name: sanity check
run: make sanitycheck
- name: unit tests
Expand Down Expand Up @@ -72,12 +94,16 @@ jobs:
- name: integration tests
run: make update-servers

macOS--dotnet6-only:
macOS--dotnet8-only:
runs-on: macOS-12
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 8.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '8.0.300'
- name: HACK to emulate mono uninstall
run: sudo rm -f `which mono` && sudo rm -f `which msbuild`
- name: configure
Expand All @@ -95,16 +121,18 @@ jobs:
- name: integration tests
run: make update-servers

windows--dotnet6-and-legacyFramework:
windows--dotnet8-and-legacyFramework:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 6.0.x
- name: Setup .NET SDK 8.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '6.0.113'
dotnet-version: '8.0.x'
- name: install maui workloads
run: dotnet workload install maui
- name: configure
run: .\configure.bat
- name: build in DEBUG mode
Expand All @@ -126,6 +154,8 @@ jobs:

# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
dotnet tool install fsxc --version 0.5.9.1
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}

Expand All @@ -152,18 +182,20 @@ jobs:
- name: integration tests
run: .\make update-servers

windows--dotnet6-only:
windows--dotnet8-only:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 6.0.x
- name: Setup .NET SDK 8.0.x
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '6.0.113'
dotnet-version: '8.0.x'
- name: HACK to emulate legacy .NETFramework uninstall
run: del $(& "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -find MSBuild\\**\\Bin\\MSBuild.exe)
- name: install maui workloads
run: dotnet workload install maui
- name: configure
run: .\configure.bat
- name: build in DEBUG mode
Expand All @@ -185,6 +217,8 @@ jobs:

# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
dotnet tool install fsxc --version 0.5.9.1
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}

Expand All @@ -193,7 +227,13 @@ jobs:
steps:
- uses: actions/checkout@v1
with:
submodules: false
submodules: true
- name: Setup .NET SDK ${{ env.DotNetVersionForMauiGtk }}
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersionForMauiGtk }}
- name: Install gtk workload & add Maui Nuget source
run: ./scripts/prepare_maui_gtk.sh
- name: install missing dependencies
run: sudo apt install --yes fsharp nunit-console
- name: check mono version
Expand Down Expand Up @@ -283,7 +323,7 @@ jobs:
- name: integration tests
run: make update-servers

linux-vanilla--stockdotnet6-only:
linux-vanilla--stockdotnet8-only:
runs-on: ubuntu-22.04
container:
image: "ubuntu:22.04"
Expand All @@ -296,7 +336,7 @@ jobs:
- name: install sudo
run: apt update && apt install --yes sudo
- name: install all dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8

# workaround for https://github.com/actions/runner/issues/2033
- name: ownership workaround
Expand All @@ -322,10 +362,12 @@ jobs:

# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
dotnet tool install fsxc --version 0.5.9.1
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}

linux-vanilla--stockdotnet6-and-newmono:
linux-vanilla--stockdotnet8-and-newmono:
runs-on: ubuntu-22.04
container:
image: "ubuntu:22.04"
Expand All @@ -338,7 +380,7 @@ jobs:
- name: install sudo
run: apt update && apt install --yes sudo
- name: install all dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8
- name: install last version of mono (Microsoft APT repositories)
run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh

Expand Down Expand Up @@ -366,10 +408,12 @@ jobs:

# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
dotnet tool install fsxc --version 0.5.9.1
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}

linux-vanilla--stockdotnet6-and-stockmono:
linux-vanilla--stockdotnet8-and-stockmono:
runs-on: ubuntu-22.04
container:
image: "ubuntu:22.04"
Expand All @@ -382,7 +426,7 @@ jobs:
- name: install sudo
run: apt update && apt install --yes sudo
- name: install all dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 mono-xbuild fsharp
run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet8 mono-xbuild fsharp
- name: install GTK libs (dependency of GTK frontend)
run: sudo apt install --yes libgtk2.0-cil-dev
# workaround for https://github.com/actions/runner/issues/2033
Expand All @@ -409,6 +453,8 @@ jobs:

# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
dotnet tool install fsxc --version 0.5.9.1
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}

Expand Down Expand Up @@ -462,15 +508,15 @@ jobs:
- linux-github--dotnet-and-newmono
- linux-vanilla--stockmono-only
- linux-vanilla--newmono-only
- linux-vanilla--stockdotnet6-only
- linux-vanilla--stockdotnet6-and-stockmono
- linux-vanilla--stockdotnet6-and-newmono
- windows--dotnet6-and-legacyFramework
- linux-vanilla--stockdotnet8-only
- linux-vanilla--stockdotnet8-and-stockmono
- linux-vanilla--stockdotnet8-and-newmono
- windows--dotnet8-and-legacyFramework
- windows--legacyFramework-only
- windows--dotnet6-only
- macOS--dotnet6-and-mono
- windows--dotnet8-only
- macOS--dotnet8-and-mono
- macOS--mono-only
- macOS--dotnet6-only
- macOS--dotnet8-only

steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -507,9 +553,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
run: ./scripts/install_snapcraft.sh

# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
Expand Down Expand Up @@ -552,9 +596,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: |
sudo apt update
./scripts/install_snapcraft.sh
run: ./scripts/install_snapcraft.sh

# hack to disable msbuild detection
# NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild,
Expand Down Expand Up @@ -592,3 +634,47 @@ jobs:
run: |
sudo apt update
./scripts/snap_release.sh beta

snap_alpha:

needs:
- conventions

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: Install snap tools
run: ./scripts/install_snapcraft.sh maui

- name: Setup .NET SDK ${{ env.DotNetVersionForMauiGtk }}
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotNetVersionForMauiGtk }}

- name: Bump snap version
run: |
git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive
dotnet fsi ./scripts/snap_bump.fsx

- name: Generate snap package
run: ./scripts/snap_build_maui.sh || (cat /home/runner/.local/state/snapcraft/log/*.log && exit 1)

- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap

- name: Test snap
run: gee-maui-preview.geewallet --version

- uses: actions/upload-artifact@v3
name: Upload snap package as artifact
with:
name: snap_alpha
path: ./*.snap

- name: Upload snap package to Snap Store
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
run: |
sudo apt update
./scripts/snap_release.sh edge
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,12 @@ fabric.properties
.fake
.ionide

# Maui generated code
src/GWallet.Frontend.Maui/WelcomePage.xaml
src/GWallet.Frontend.Maui/WelcomePage2.xaml
src/GWallet.Frontend.Maui/LoadingPage.xaml
src/GWallet.Frontend.Maui/BalancesPage.xaml
src/GWallet.Frontend.Maui/PairingFromPage.xaml
src/GWallet.Frontend.Maui/PairingToPage.xaml
src/GWallet.Frontend.Maui/SendPage.xaml
src/GWallet.Frontend.Maui/ReceivePage.xaml
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "scripts/fsx"]
path = scripts/fsx
url = https://github.com/nblockchain/fsx.git
[submodule "dependencies/maui"]
path = dependencies/maui
url = https://github.com/nblockchain/Mali.git
1 change: 1 addition & 0 deletions dependencies/maui
Submodule maui added at 8f182d
26 changes: 26 additions & 0 deletions geewallet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fsdk", "Fsdk", "{6EE07541-9
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.ConsoleApp", "src\GWallet.Frontend.ConsoleApp\GWallet.Frontend.ConsoleApp.fsproj", "{EFACE810-A402-4673-B8B5-4517E698EACE}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Maui", "src\GWallet.Frontend.Maui\GWallet.Frontend.Maui.fsproj", "{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -306,6 +308,30 @@ Global
{EFACE810-A402-4673-B8B5-4517E698EACE}.Release|x64.Build.0 = Release|Any CPU
{EFACE810-A402-4673-B8B5-4517E698EACE}.Release|x86.ActiveCfg = Release|Any CPU
{EFACE810-A402-4673-B8B5-4517E698EACE}.Release|x86.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|ARM.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|ARM.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|iPhone.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|x64.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|x64.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|x86.ActiveCfg = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Debug|x86.Build.0 = Debug|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|Any CPU.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|ARM.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|ARM.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|iPhone.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|iPhone.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|x64.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|x64.Build.0 = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|x86.ActiveCfg = Release|Any CPU
{CA29AD29-DD6C-48F6-B51E-4B8B4C8D6844}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 6 additions & 0 deletions global-net8.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.0",
"rollForward": "latestMinor"
}
}
Loading
Loading