-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: fix broken ci components #51
Conversation
@@ -17,5 +17,5 @@ jobs: | |||
|
|||
- name: Format | |||
working-directory: ./src | |||
run: dotnet format --verify-no-changes | |||
run: dotnet format --verify-no-changes --no-restore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding --no-restore
fixes a runtime issue. The parameter:
Doesn't execute an implicit restore before formatting. Default is to do implicit restore.
@@ -12,14 +12,24 @@ on: | |||
jobs: | |||
build: | |||
|
|||
runs-on: ubuntu-latest | |||
runs-on: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching to windows image so we can test MAUI build for Android, Windows, iOS and macOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a Windows image (and Ubuntu before, too) build for iOS and macOS?
- name: Setup JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'microsoft' | ||
java-version: '17' | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setup Android build requirements
- name: Restore workloads | ||
working-directory: ./src | ||
run: dotnet workload restore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installs MAUI workloads
<TargetFrameworks>net8.0-android</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))"> | ||
$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks> | ||
$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041.0</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('osx'))"> | ||
$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the platform is Windows, it builds for Windows, Android, Mac and iOS. When the platform is osx (macos) it builds for Android, iOS and Mac. On the rest of platforms (basically Linux) it only builds for Android.
Same for the Sample project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this answers my question above.
builder.Services.AddBlazorWebViewDeveloperTools(); | ||
builder.Logging.AddDebug(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes formatting
When viewing the Files Changed tab, there are some warnings to address, could you perhaps look into those. Or, if they're an Issue already, I'm happy with them being in a separate branch, |
I'll address them in this branch @sumitramanga |
@sumitramanga the warnings have been addressed now |
@@ -12,14 +12,24 @@ on: | |||
jobs: | |||
build: | |||
|
|||
runs-on: ubuntu-latest | |||
runs-on: windows-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a Windows image (and Ubuntu before, too) build for iOS and macOS?
<TargetFrameworks>net8.0-android</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))"> | ||
$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks> | ||
$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041.0</TargetFrameworks> | ||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('osx'))"> | ||
$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this answers my question above.
Yep, I tried to make it work on Ubuntu but compiling on Linux only works for Android MAUI apps (and only from CLI, not even in Rider). Windows VMs seem the best compromise as it can build for all 4 platforms. |
ci: fix broken ci components
Description 📝
Type of change'
Updates
Test plan 🧪
Author to check 👓
Reviewer to check ✔️