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 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3641520
Add Maui base project
parhamsaremi Jan 15, 2023
6cff6cd
Frontend.Maui: use XF XAML files for building proj
parhamsaremi Jan 15, 2023
a522d17
Frontend.Maui: workaround for build fail in VS22
webwarrior-ws Nov 21, 2023
9491d51
Frontend.Maui: build Maui on linux using GTK
parhamsaremi Jan 16, 2023
bd47559
CI: build Maui (non-GTK) frontend
webwarrior-ws Apr 17, 2024
201c2c5
Frontend.Maui: fix window size for gtk
parhamsaremi Feb 15, 2023
c3b545b
Frontend.MAUI: add WelcomePage2
webwarrior-ws Mar 1, 2023
7f8c057
Frontend.Maui: make Linux debugging possible
webwarrior-ws Mar 7, 2023
48adf76
Frontend.Maui: add LoadingPage
webwarrior-ws Mar 16, 2023
f9bd0eb
Frontend.Maui: add BalancesPage
webwarrior-ws Apr 3, 2023
f73d421
Frontend.Maui: add ZXing.Net.Maui library
webwarrior-ws Apr 26, 2023
d85857d
Frontend(XF,Maui): added remaining pages
webwarrior-ws Apr 3, 2023
2ac9c55
Frontend.Maui: Color.Default equivalent for Maui
parhamsaremi May 23, 2023
20f4604
GithubCI: use nuget source instead of Github
parhamsaremi May 25, 2023
be02727
CI: upoad APK as CI artifact
webwarrior-ws Apr 18, 2024
f00aba3
sln,Frontend.Maui: allow proj be built in VS4Mac
knocte Apr 23, 2024
fa4caf3
Frontend.Maui: show navigation bar on Android
webwarrior-ws Apr 23, 2024
276a078
CI,scripts,Frontend.Maui: build MAUI snap
webwarrior-ws Apr 24, 2024
5b65ad9
snap: use dotnet runtime from packages
webwarrior-ws May 20, 2024
519d1b1
snap: use dotnet-runtime-7.0 in MAUI snap
webwarrior-ws May 20, 2024
c36c039
Frontend.Maui: switch to .NET8 for Android
webwarrior-ws May 20, 2024
6ed75c8
Frontend.Maui: update Maui submodule
webwarrior-ws May 9, 2024
27b09b6
Frontend.Maui: show nav toolbar after page load
webwarrior-ws May 21, 2024
8acc238
Frontend.Maui: update Maui submodule
webwarrior-ws May 22, 2024
2569e7f
Frontend.Maui: show navigation bar on SendPage
webwarrior-ws May 23, 2024
aad25ab
Frontend.Maui: change from CrossMaui to Mali
webwarrior-ws May 23, 2024
7aa18a1
Frontend.Maui: fix title on Gtk
webwarrior-ws May 23, 2024
a91997e
Frontend.Maui: show nav bar page after sending tx
webwarrior-ws May 27, 2024
d50ea67
Frontend.Maui: fix button padding on Gtk
webwarrior-ws May 27, 2024
a389955
scripts,CI: determine & build frontend in scripts
webwarrior-ws May 23, 2024
d4c8d74
Frontend.Maui: fix spacing after "Amount" label
webwarrior-ws May 29, 2024
07e2af3
CI,scripts: refactoring of Maui/Gtk builds
webwarrior-ws May 29, 2024
1e2b5e9
Frontend.Maui: use fix in Mali for WelcomePage
webwarrior-ws May 23, 2024
6812f2c
CI,scripts,snap,Frontend.Maui: use .NET 8
webwarrior-ws Jun 13, 2024
ff6c345
Frontend.Maui: fix some layout issues on Maui/Gtk
webwarrior-ws Jun 19, 2024
4a377de
Forntend.Maui: workaround for button width on Gtk
webwarrior-ws Jun 20, 2024
3e592c2
Frontend(XF,Maui): fix in WelcomePage (datepicker)
webwarrior-ws Jun 26, 2024
5db7bfd
CI,scripts: upload MAUI snap to snap store
webwarrior-ws May 16, 2024
3adb567
Frontend.Maui,.gitmodules,scripts: use Mali pckgs
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
159 changes: 125 additions & 34 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,28 @@ 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-13
env:
# make it work with newer .NET
DOTNET_ROLL_FORWARD: 'Major'
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 6.0.x
- name: Setup .NET SDK 8.0.x
uses: actions/[email protected]
with:
dotnet-version: '6.0.113'
dotnet-version: '8.0.300'
- name: Install specific Xamarin.iOS and Xamarin.Android versions
run: |
wget https://download.visualstudio.microsoft.com/download/pr/81c41aaa-a3d7-4875-8416-d04b472379b7/21d9f6c5ad3a6bc2479b2ec4b0685b6c/xamarin.ios-16.0.0.72.pkg
Expand All @@ -39,11 +44,30 @@ jobs:
run: |
mono --version
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mtouch --version
ls -l /Library/Frameworks/Xamarin.Android.framework/Versions/
ls -l /Library/Frameworks/Xamarin.Android.framework/Versions/
- 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 @@ -96,16 +120,16 @@ jobs:
- name: integration tests
run: make update-servers

macOS--dotnet6-only:
macOS--dotnet8-only:
runs-on: macOS-13
steps:
- uses: actions/checkout@v1
with:
submodules: false
- name: Setup .NET SDK 6.0.x
- name: Setup .NET SDK 8.0.x
uses: actions/[email protected]
with:
dotnet-version: '6.0.113'
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 @@ -127,19 +151,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/[email protected]
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 @@ -160,6 +188,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 @@ -186,18 +216,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/[email protected]
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 @@ -218,6 +250,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 @@ -226,7 +260,13 @@ jobs:
steps:
- uses: actions/checkout@v1
with:
submodules: false
submodules: true
- name: Setup .NET SDK ${{ env.DotNetVersionForMauiGtk }}
uses: actions/[email protected]
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 @@ -250,8 +290,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 @@ -287,6 +330,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 @@ -330,7 +375,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 @@ -343,7 +388,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 @@ -368,10 +413,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 @@ -384,7 +431,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 @@ -411,10 +458,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 @@ -427,7 +476,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 @@ -453,6 +502,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 @@ -506,15 +557,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 @@ -551,9 +602,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 @@ -596,9 +645,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 @@ -636,3 +683,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/[email protected]
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
Loading
Loading