-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI,scripts: refactoring of Maui/Gtk builds
Extracted installation of gtk workload and adding Maui nuget source to separate script to remove code duplication. Renamed DotNetVersion to DotNetVersionForMauiGtk and made it and GtkSharpVersion workflow-level env vars in CI.yml.
- Loading branch information
1 parent
bd5d320
commit 67c1e52
Showing
3 changed files
with
30 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ on: | |
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
env: | ||
GtkSharpVersion: 3.24.24.95 | ||
DotNetVersionForMauiGtk: 6.0.400 | ||
|
||
# FIXME: figure out why we need to clean after make if we | ||
# want 'make strict' target to really happen without | ||
|
@@ -209,33 +212,16 @@ jobs: | |
linux-github--dotnet-and-mono: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
GtkSharpVersion: 3.24.24.95 | ||
DotnetVersion: 6.0.400 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
- name: Setup .NET SDK ${{ env.DotnetVersion }} | ||
- name: Setup .NET SDK ${{ env.DotNetVersionForMauiGtk }} | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: ${{ env.DotnetVersion }} | ||
- name: Install gtk workload | ||
run: | | ||
wget -O gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg https://globalcdn.nuget.org/packages/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.$GtkSharpVersion.nupkg | ||
DOTNET_DIR=/home/runner/.dotnet | ||
WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/${{ env.DotnetVersion }}/gtksharp.net.sdk.gtk | ||
mkdir -p $WORKLOAD_MANIFEST_DIR/ | ||
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: Add Maui Nuget source | ||
run: | | ||
cd dependencies/maui | ||
dotnet nuget add source --name nuget https://api.nuget.org/v3/index.json | ||
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 | ||
|
@@ -637,18 +623,15 @@ jobs: | |
- conventions | ||
|
||
runs-on: ubuntu-22.04 | ||
env: | ||
GtkSharpVersion: 3.24.24.95 | ||
DotnetVersion: 6.0.400 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install snap tools | ||
run: ./scripts/install_snapcraft.sh maui | ||
|
||
- name: Setup .NET SDK ${{ env.DotnetVersion }} | ||
- name: Setup .NET SDK ${{ env.DotNetVersionForMauiGtk }} | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: ${{ env.DotnetVersion }} | ||
dotnet-version: ${{ env.DotNetVersionForMauiGtk }} | ||
|
||
- name: Bump snap version | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
# Install gtk workload | ||
wget -O gtksharp.net.sdk.gtk.manifest-$DotNetVersionForMauiGtk.nupkg https://globalcdn.nuget.org/packages/gtksharp.net.sdk.gtk.manifest-$DotNetVersionForMauiGtk.$GtkSharpVersion.nupkg | ||
DOTNET_DIR=~/.dotnet | ||
WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/$DotNetVersionForMauiGtk/gtksharp.net.sdk.gtk | ||
mkdir -p $WORKLOAD_MANIFEST_DIR/ | ||
unzip -j gtksharp.net.sdk.gtk.manifest-$DotNetVersionForMauiGtk.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/ | ||
rm gtksharp.net.sdk.gtk.manifest-$DotNetVersionForMauiGtk.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 | ||
|
||
#Add Maui Nuget source | ||
cd dependencies/maui | ||
dotnet nuget add source --name nuget https://api.nuget.org/v3/index.json | ||
cd ../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters