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

Upgrade to .NET 8 #94

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 4 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For background, the reason why i pinned it to -13 at one point was because eto/dotnet was behaving really strangely with back then it being latest. Not sure if it's fixed now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos still fails, but I don't consider it blocking.

LLINK : warning MM0079: The recommended Xcode version for Microsoft.macOS 15.0.8319 is Xcode 16.0 or later. The current Xcode version (found in /Applications/Xcode_15.4.app/Contents/Developer) is 15.4. [/Users/runner/work/AM2RLauncher/AM2RLauncher/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj]

ILLink : unknown error IL7000: An error occurred while executing the custom linker steps. Please review the build log for more information. [/Users/runner/work/AM2RLauncher/AM2RLauncher/AM2RLauncher/AM2RLauncher.Mac/AM2RLauncher.Mac.csproj]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peeley you wanna try changing ~line 44 for this or keep it as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh man, I didn't even notice that line. I was wondering why the Xcode version was behaving weirdly. I'm gonna just try and delete that, since the same command works locally on MacOS (and I don't see why that specific version of XCode is needed, instead of the latest version).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos-latest doesnt have the latest xcode enabled by default for whatever reason.
At least last that was the case when I added it. Deleting it doesnt actually do anyting because it currently doesnt already get triggered on your branch because its wrapped in an if macos-13, while we're on macos-latest

The switch there needs to be changed to 16.0 or 16.1

See here: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#xcode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out I was misunderstanding what macos-latest points to - I thought it was macos-15, but it points to macos-14 (src). macos-15 has the correct XCode version, so I think I need to point to macos-15 explicitly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos-15 is still in beta (your source) so I'd like to not point to it explicitly.
I'd just point to macos-latest and have the xcode switch removed - by the time someone makes another pull request macos15 is hopefully Generally Available and then those tests.

configuration: [Release]
include:
- os: ubuntu-latest
COMMAND: AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r ubuntu.18.04-x64 --no-self-contained
ARTIFACT: AM2RLauncher/AM2RLauncher.Gtk/bin/Release/net6.0/ubuntu.18.04-x64/publish/
- os: macos-13
COMMAND: AM2RLauncher.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r linux-x64 --no-self-contained
ARTIFACT: AM2RLauncher/AM2RLauncher.Gtk/bin/Release/net8.0/ubuntu.18.04-x64/publish/
- os: macos-latest
COMMAND: AM2RLauncher.Mac -o builds/macOS-latest
ARTIFACT: AM2RLauncher/builds/macOS-latest
- os: windows-latest
Expand All @@ -40,9 +40,6 @@ jobs:
- name: Install Mac workload
working-directory: ./AM2RLauncher
run: dotnet workload install macos && dotnet workload restore
- name: Switch XCode
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app/Contents/Developer
if: matrix.os == 'macos-13'
- name: Restore dependencies
working-directory: ./AM2RLauncher
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion AM2RLauncher/AM2RLauncher.Gtk/AM2RLauncher.Gtk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ApplicationIcon>icon64.ico</ApplicationIcon>
<RollForward>LatestMajor</RollForward>
<LangVersion>latest</LangVersion>
Expand Down
6 changes: 0 additions & 6 deletions AM2RLauncher/AM2RLauncherLib/AM2RLauncherLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,4 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.ComponentModel.Annotations">
<HintPath>..\..\..\..\..\.cache\NuGet\system.componentmodel.annotations\5.0.0\ref\netstandard2.0\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
Loading