Skip to content

Core: better ApplicationId for MauiGtkApplication #220

Core: better ApplicationId for MauiGtkApplication

Core: better ApplicationId for MauiGtkApplication #220

Workflow file for this run

name: Build Controls.Sample.Gtk
on: [push, pull_request]
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-22.04
env:
GtkSharpVersion: 3.24.24.77-develop
DotnetVersion: 6.0.300
steps:
- name: Checkout MAUI repo
uses: actions/checkout@v2
# We also tested using 6.0.111 for both projects
# but MAUI failed to build on this version with this error:
# Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
# So instead we use 6.0.300
- name: Setup .NET SDK ${{ env.DotnetVersion }}
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: ${{ env.DotnetVersion }}
- name: Install gtk workload
run: |
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/GtkSharp/index.json"
# For some reason automatic workload manifest detection doesn't work (see https://github.com/GtkSharp/GtkSharp/issues/355#issuecomment-1446262239), so download and uzip mainfest file manually
wget --user ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} https://nuget.pkg.github.com/GtkSharp/download/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}/$GtkSharpVersion/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg
DOTNET_DIR=/home/runner/.dotnet
WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/${{ env.DotnetVersion }}/gtksharp.net.sdk.gtk
unzip -j gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/
rm gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg
# otherwise we get System.UnauthorizedAccessException: Access to the path '/home/runner/.dotnet/sdk-manifests/6.0.300/gtksharp.net.sdk.gtk/WorkloadManifest.json' is denied.
chmod 764 $WORKLOAD_MANIFEST_DIR/*
dotnet workload search
dotnet workload install gtk --skip-manifest-update
- name: Build MAUI
run: |
dotnet build Microsoft.Maui.Gtk.slnf
- name: Build ZXing.Net.Maui
run: |
dotnet build ./src/ZXing.Net.Maui/ZXing.Net.MAUI/ZXing.Net.MAUI.csproj --framework=net6.0-gtk
dotnet build ./src/ZXing.Net.Maui/ZXing.Net.MAUI.Controls/ZXing.Net.MAUI.Controls.csproj --framework=net6.0-gtk
dotnet-format:
needs: build_and_test
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run dotnet format
run: |
dotnet format whitespace ./src --folder --exclude Templates/src --exclude ZXing.Net.Maui
git diff --exit-code