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 #299

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6ea2bfe
Add Maui base project
parhamsaremi Jan 15, 2023
e071064
Frontend.Maui: use XF XAML files for building proj
parhamsaremi Jan 15, 2023
d514bbc
Frontend.Maui: workaround for build fail in VS22
webwarrior-ws Nov 21, 2023
8e7b2e7
Frontend.Maui: build Maui on linux using GTK
parhamsaremi Jan 16, 2023
2939e3e
CI: build Maui (non-GTK) frontend
webwarrior-ws Apr 17, 2024
4de680f
Frontend.Maui: fix window size for gtk
parhamsaremi Feb 15, 2023
ee52044
Frontend.MAUI: add WelcomePage2
webwarrior-ws Mar 1, 2023
caa6b3f
Frontend.Maui: make Linux debugging possible
webwarrior-ws Mar 7, 2023
9b3bf81
Frontend.Maui: add LoadingPage
webwarrior-ws Mar 16, 2023
5fd07d8
Frontend.Maui: add BalancesPage
webwarrior-ws Apr 3, 2023
bde855b
Frontend.Maui: add ZXing.Net.Maui library
webwarrior-ws Apr 26, 2023
ef81dce
Frontend(XF,Maui): added remaining pages
webwarrior-ws Apr 3, 2023
a5a4fc1
Frontend.Maui: Color.Default equivalent for Maui
parhamsaremi May 23, 2023
c4d5386
GithubCI: use nuget source instead of Github
parhamsaremi May 25, 2023
7505a86
CI: upoad APK as CI artifact
webwarrior-ws Apr 18, 2024
e84d674
sln,Frontend.Maui: allow proj be built in VS4Mac
knocte Apr 23, 2024
3f64345
Frontend.Maui: show navigation bar on Android
webwarrior-ws Apr 23, 2024
f6c7cbc
CI,scripts,Frontend.Maui: build MAUI snap
webwarrior-ws Apr 24, 2024
fb5269d
snap: use dotnet runtime from packages
webwarrior-ws May 20, 2024
5a45af6
snap: use dotnet-runtime-7.0 in MAUI snap
webwarrior-ws May 20, 2024
e80c3cd
Frontend.Maui: switch to .NET8 for Android
webwarrior-ws May 20, 2024
f34efb5
Frontend.Maui: update Maui submodule
webwarrior-ws May 9, 2024
ad5961a
Frontend.Maui: show nav toolbar after page load
webwarrior-ws May 21, 2024
d075a18
Frontend.Maui: update Maui submodule
webwarrior-ws May 22, 2024
82d747b
Frontend.Maui: show navigation bar on SendPage
webwarrior-ws May 23, 2024
f979c84
Frontend.Maui: change from CrossMaui to Mali
webwarrior-ws May 23, 2024
ffbafcf
Frontend.Maui: fix title on Gtk
webwarrior-ws May 23, 2024
a4bc73c
Frontend.Maui: show nav bar page after sending tx
webwarrior-ws May 27, 2024
e6986db
Frontend.Maui: fix button padding on Gtk
webwarrior-ws May 27, 2024
2171300
scripts,CI: determine & build frontend in scripts
webwarrior-ws May 23, 2024
4d04256
Frontend.Maui: fix spacing after "Amount" label
webwarrior-ws May 29, 2024
1860173
CI,scripts: refactoring of Maui/Gtk builds
webwarrior-ws May 29, 2024
0e61f11
Frontend.Maui: use fix in Mali for WelcomePage
webwarrior-ws May 23, 2024
ae1f179
CI,scripts,snap,Frontend.Maui: use .NET 8
webwarrior-ws Jun 13, 2024
22d9d23
Frontend.Maui: fix some layout issues on Maui/Gtk
webwarrior-ws Jun 19, 2024
dea5d4b
Forntend.Maui: workaround for button width on Gtk
webwarrior-ws Jun 20, 2024
d5950d3
Frontend(XF,Maui): fix in WelcomePage (datepicker)
webwarrior-ws Jun 26, 2024
182695e
CI,scripts: upload MAUI snap to snap store
webwarrior-ws May 16, 2024
4c705d8
Frontend.Maui: use Mali packages
webwarrior-ws Nov 25, 2024
9d6e822
Frontend.Maui: use ZXing nuget packages on GTK
webwarrior-ws Nov 25, 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
156 changes: 125 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,48 @@ on:
env:
# we need to install specific version because of this bug: https://github.com/dotnet/sdk/issues/24037
FSXC_VERSION: 0.5.9.1
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 All @@ -48,6 +69,8 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

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

Expand All @@ -74,12 +97,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 @@ -101,19 +128,23 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

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

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 @@ -134,6 +165,8 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

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

Expand All @@ -160,18 +193,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 @@ -192,6 +227,8 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

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

Expand All @@ -200,7 +237,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 All @@ -224,8 +267,11 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# make it work with newer .NET
export DOTNET_ROLL_FORWARD=Major

find . -type f -name "*.fsx" | xargs -t -I {} dotnet fsxc {}
# ignore scripts/fsx submodule as compiling scripts there will result in error
find . -type f -name "*.fsx" ! -path "./scripts/fsx/*" | xargs -t -I {} dotnet fsxc {}

linux-github--dotnet-and-newmono:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -261,6 +307,8 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# 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 @@ -304,7 +352,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 @@ -317,7 +365,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 @@ -342,10 +390,12 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# 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 @@ -358,7 +408,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 All @@ -385,10 +435,12 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# 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 @@ -401,7 +453,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 @@ -427,6 +479,8 @@ jobs:
dotnet new tool-manifest

dotnet tool install fsxc --version ${{ env.FSXC_VERSION }}
# 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 @@ -480,15 +534,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 @@ -525,9 +579,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 @@ -570,9 +622,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 @@ -610,3 +660,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
Loading
Loading