Граф коммитов

17985 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0d7d336e0e
[net9.0] Migrate Messaging Build agent to .NET 8 (#21264)
This is part of the effort to migrate the Pair to Mac agents .NET.

As the Xamarin.iOS.Tasks.Windows project targets netstandard2.0, I'm
removing the Build agent reference, and modifying the Makefile to take
it from it's output directory. Note: the agent zip file is generated in
the intermediate output directory.

---------

Co-authored-by: Emanuel Fernandez Dell'Oca <ema@xamarin.com>
2024-09-24 16:19:00 +02:00
Ivan Povazan 22b5933ebb
NativeAOT: Reenable failing networking tests on tvOS/x64 with NativeAOT (#21285)
This PR reenables failing tests on tvOS/x64 with NativeAOT as the
dotnet/runtime fix became available in:
cd064dd8cc
and got merged in to the xamarin net9.0 branch.

The tests were previously disabled in:
https://github.com/xamarin/xamarin-macios/pull/20949

---
Fixes: https://github.com/xamarin/xamarin-macios/issues/20972
2024-09-24 08:29:03 +02:00
Ivan Povazan 5633f4e890
NativeAOT: Fix output dir path for universal apps built with NativeAOT (#21288)
### Description 

When building universal apps with NativeAOT, the output path for the app bundle (and zipped .ipa) is incorrect when building with NativeAOT.

For example publishing a MAUI template app with NativeAOT gives the following output (notice: `osx-arm64`):
```
Created the package: /Users/ivan/tmp/net9-rc1/MacCatRc1/bin/Release/net9.0-maccatalyst/osx-arm64/publish/MacCatRc1-1.0.pkg
```
and the following output tree:
```
bin/Release 
bin/Release/net9.0-maccatalyst 
bin/Release/net9.0-maccatalyst/maccatalyst-arm64/*
bin/Release/net9.0-maccatalyst/maccatalyst-x64/*
bin/Release/net9.0-maccatalyst/osx-arm64
bin/Release/net9.0-maccatalyst/osx-arm64/MacCatRc1.app/*
bin/Release/net9.0-maccatalyst/osx-arm64/publish/*
```

The problem comes from the fact that .NET SDK for NativeAOT builds will try to resolve `RuntimeIdentifier` when it is not specified in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L95-L114)

which resolves to `osx-arm64` and gets later used to setup `IntermediateOutputPath` and `OutputPath` in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L343-L346)
 
However, this shouldn't be done in universal builds, as the outer build does not have the runtime identifier specified and should not be altered.

### Changes

In this PR we are disabling the resolution of the `RuntimeIdentifier` when building universal apps with NativeAOT early in SDK in order to fix the output path.

I also included unit tests to verify the existence of .app bundles. 

### Follow-up

There is an additional issue with Debug builds of universal apps with NativeAOT, where merging PDBs fails, which is reported in: https://github.com/xamarin/xamarin-macios/issues/20903

---
Contributes to: https://github.com/xamarin/xamarin-macios/issues/20903

---------

Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
2024-09-23 21:18:12 +02:00
Rolf Bjarne Kvinge 1fccb419b6
[net9.0] Bump our .NET 8 packages. (#21275)
Co-authored-by: Alex Soto <alex@soto.dev>
2024-09-23 20:02:08 +02:00
Jeremi Kurdek d5a7b3981c
Fix MobileILStrip handling of unmanaged dlls (#21098)
Fixes https://github.com/dotnet/runtime/issues/101967
Follow up to the runtime change
https://github.com/dotnet/runtime/pull/106267
2024-09-20 20:01:44 +02:00
dotnet-maestro[bot] 571cb3164b
[net9.0] Update dependencies from dotnet/sdk (#21252)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-rc.2.24466.2 to 9.0.0-rtm.24466.12 (parent: Microsoft.NET.Sdk)

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240918.2
- **Date Produced**: September 18, 2024 8:48:35 AM UTC
- **Commit**: c204043de141a4d00ae5b4ec1b82aab67cccac1d
- **Branch**: refs/heads/release/9.0.1xx

- **Updates**:
  - **Microsoft.NET.Sdk**: [from 9.0.100-rc.2.24466.29 to 9.0.100-rc.2.24468.2][4]
  - **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-rc.2.24466.2 to 9.0.0-rtm.24466.12][5]

[4]: 92b8b5eb94...c204043de1
[5]: 9b3ca0b29a...0d72ad5e4c
2024-09-20 12:56:43 +02:00
Rolf Bjarne Kvinge 003ef568be
[net9.0] Merge main into net9.0. (#21272)
This brings Xcode 16 support to .NET 9.
2024-09-20 12:48:59 +02:00
Rolf Bjarne Kvinge 4905c7952b Merge remote-tracking branch 'origin/net9.0' into dev/rolf/bump-main-in-net9.0-2024-09-19 2024-09-19 17:20:26 +02:00
Rolf Bjarne Kvinge 5f0f53d0ff
[net9.0] Merge main into net9.0. (#21261) 2024-09-19 17:18:46 +02:00
Rolf Bjarne Kvinge 9abc29e486 [src] Fix availability attributes for .NET 9. 2024-09-19 10:17:36 +02:00
Rolf Bjarne Kvinge f634ea9b3c Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-18 2024-09-19 09:48:34 +02:00
Rolf Bjarne Kvinge 73719863b8
[builds] Fix restoring ilrepack. (#21265)
😡 https://github.com/dotnet/sdk/issues/11432
2024-09-19 08:57:33 +02:00
Rolf Bjarne Kvinge cc1412c67b
Merge xcode16 into main. (#21260) 2024-09-19 08:57:07 +02:00
Rolf Bjarne Kvinge d4278f360d [build] Restore the NuGet prerelease identifier/branch to the ones from 'main'. 2024-09-18 20:29:37 +02:00
Rolf Bjarne Kvinge 5bd58d4786 [devops] Remove the default 'xcodeChannel' value for the API diff.
The consumers of the API stage already passes a value, so a default is not needed.

This reduces the number of places we have to change every time we switch between stable and beta.
2024-09-18 20:27:52 +02:00
Rolf Bjarne Kvinge a5489a9250 [net9.0] Merge main into net9.0. 2024-09-18 18:19:58 +02:00
Rolf Bjarne Kvinge 31efecac61
[devops] Always run the step to get the AzDo.BearerToken. (#21250)
We need the AzDo.BearerToken in later steps that have the 'always()'
condition, and unless we actually get the AzDo.BearerToken under the same
conditions, those later steps will fail.

One example is if the job was cancelled, or previous steps failed (which is
common when running tests).

Example failure for re-enabling macOS bots:

```
AzDO.BearerToken : The term 'AzDO.BearerToken' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\AzDO\_work\_temp\9b207e8a-c163-4c97-93d3-e7e3bb908583.ps1:6 char:23
+ $azdoBearerToken = "$(AzDO.BearerToken)"
+                       ~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (AzDO.BearerToken:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
```

This problem causes a lot of bots to end up disabled, because we fail to
re-enable them after using them.
2024-09-18 18:17:56 +02:00
Rolf Bjarne Kvinge 6fa626f3ac
[tests] Remove the BCL tests. (#21197)
They're legacy Xamarin only, which we don't support anymore.
2024-09-18 17:59:23 +02:00
Alex Soto 1a006c9600 [xcode16][ci] Move CI to use stable bots 2024-09-18 17:42:06 +02:00
Rolf Bjarne Kvinge 0db2dd1143 Merge remote-tracking branch 'origin/xcode16' into merge-xcode16-into-main 2024-09-18 17:41:45 +02:00
Rolf Bjarne Kvinge 5f84f5fbdd
[HealthKit] Implement Xcode 16 RC changes. (#21225) 2024-09-18 17:40:45 +02:00
dotnet-maestro[bot] 9e061ff1f1
[main] Update dependencies from dotnet/xharness (#21241)
This pull request updates the following dependencies

## From https://github.com/dotnet/xharness

- **Subscription**: 601bc5e1-1cae-44b5-cf5f-08db9342aa2f
- **Build**: 20240916.1
- **Date Produced**: September 16, 2024 10:13:27 AM UTC
- **Commit**: f20e52f7731da99588dd6b4f4bd60119f03220a3
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.DotNet.XHarness.iOS.Shared**: [from 10.0.0-prerelease.24459.1 to 10.0.0-prerelease.24466.1][1]

[1]: df9b6509e6...f20e52f773
2024-09-18 10:42:53 +02:00
Rolf Bjarne Kvinge 4a94d7679c
[BrowserEngineKit] Improve API a bit by making a few methods async. (#21236) 2024-09-18 10:14:22 +02:00
Rolf Bjarne Kvinge 32825a4eb8
[xcode16] Update to Xcode 16 stable. (#21248) 2024-09-18 08:35:41 +02:00
Rolf Bjarne Kvinge f102a3bc37
[dotnet] Change the usage of the classic linker to be opt-in. (#21231)
Fixes https://github.com/xamarin/xamarin-macios/issues/20711.
Fixes https://github.com/xamarin/xamarin-macios/issues/18693.
2024-09-18 08:34:34 +02:00
Rolf Bjarne Kvinge 016daf67df
Bump mlaunch to a version that works with Xcode 16. (#21255) 2024-09-18 08:31:55 +02:00
Rolf Bjarne Kvinge 06286a2416
[ScriptingBridge] Remove outdated tests and add documentation. Fixes #21242. (#21246)
The test we had in our codebase for the SBApplication class was not only
outdated, but also incorrect.

With recent changes the test code doesn't work anymore, so delete it.

Instead, add XML documentation that explains how to use the class in a
way that works.

Fixes https://github.com/xamarin/xamarin-macios/issues/21242.
2024-09-17 17:31:43 +02:00
Rolf Bjarne Kvinge c34823ce1f
[xcode16] Merge main into xcode16. (#21235) 2024-09-17 17:30:01 +02:00
Rolf Bjarne Kvinge c1953a54f6
[msbuild] Use ILRepack as a dotnet tool. (#21240)
This is one step towards removing the dependency on having Mono
installed during the build.

For some reason that also ended up requiring a few nullability issues in
the msbuild tests.
2024-09-17 16:22:04 +02:00
Rolf Bjarne Kvinge 58ebbe7a06 [tests] Don't use an iOS-specific storyboard on other platforms. 2024-09-17 08:45:29 +02:00
Rolf Bjarne Kvinge 8106ee643d
[github] Make it possible to drop files in the "Additional Logs" field. Fixes #21243. (#21245)
GitHub won't allow dropping files into a field where 'render: shell'
(presumably because that means the field will automatically become a
fenced block in the final issue), so just remove the 'render' property (this
way it matches all the other input fields).

Fixes https://github.com/xamarin/xamarin-macios/issues/21243.
2024-09-17 06:59:36 +02:00
Rolf Bjarne Kvinge 4c10b3a2ab Merge remote-tracking branch 'origin/xcode16' into dev/rolf/bump-main-in-xcode16-2024-09-13 2024-09-17 06:57:27 +02:00
Rolf Bjarne Kvinge 00ec47ae39 Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-xcode16-2024-09-13 2024-09-17 06:57:03 +02:00
Rolf Bjarne Kvinge f05ea25971
[msbuild] Don't use storyboards / asset catalogs in the prebuilt HotRestart app bundle. (#21237)
Use the Info.plist to set the launch image and app icons for the app, instead
of using a storyboard / asset catalog.

One minor change is that the ".NET" text in the launch image is not located in
exactly the same place anymore. This is because it was rather complicated to
get the background color of the launch image correct. I tried numerous
options, neither of them fully work:

* Set the background color in the launch sreen png itself: this will create
  black or white borders around the image.
* Use svg: svg doesn't work.
* There doesn't seem to be a way to specify multiple launch screen images, and
  have iOS pick the best one depending on the target device size.

The end solution was to provide a really big launch screen png, so that there
won't be any black or white border on any of today's devices. The downside is,
as mentioned, that the text is not located in the same place once iOS has
adjusted the size of the image to fit the current device.

The big advantage is that this means we won't need to install the iOS
simulator on CI during our product build, we only need Xcode itself (we'll
still need all the simulators for our tests).

iPhone launch screen:

![IMG_0423](https://github.com/user-attachments/assets/761f7ed9-73f9-4c2b-821f-6eb87010f901)

iPad launch screen:

![IMG_0146](https://github.com/user-attachments/assets/b71c2f0f-6cf7-4ad4-b6c8-013617287ed4)
2024-09-17 06:56:07 +02:00
Rolf Bjarne Kvinge ae4ef0e179
Revert "[CI] Split the sim tests and the macOS tests. (#21215)" (#21247)
This reverts commit e993173a3c.

It breaks CI (tests are still running duplicated, except for the macOS
tests, which aren't running, except on the xcode16 branch, where they're
running and failing).
2024-09-17 06:47:51 +02:00
dotnet-maestro[bot] 1dd6b6c4f2
[net9.0] Update dependencies from dotnet/sdk (#21085)
This pull request updates the following dependencies

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240914.3
- **Date Produced**: September 14, 2024 9:05:51 PM UTC
- **Commit**: 1a658dfc714a5064eea57af48d5fd68a3ffab7ef
- **Branch**: refs/heads/release/9.0.1xx

- **Updates**:
  - **Microsoft.NET.Sdk**: [from 9.0.100-rc.2.24463.45 to 9.0.100-rc.2.24464.3][49]

[49]: 0f07337f8d...1a658dfc71

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-rc.2.24462.5 to 9.0.0-rc.2.24463.6 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24461.16 to 9.0.0-rc.2.24462.10 (parent: Microsoft.NET.Sdk)
2024-09-16 19:54:05 +02:00
Rolf Bjarne Kvinge 280b27aec1
[CoreMidi] Implement Xcode 16.0 beta 1-6 changes. (#20882)
Note: there were no changes in beta 3, beta 4, beta 5 or beta 6.
2024-09-16 10:59:28 +02:00
Rolf Bjarne Kvinge cfcfd42947
[tools] Fix typo 'occured' -> 'occurred'. (#21208) 2024-09-16 10:16:27 +02:00
Rolf Bjarne Kvinge e45dca7413
[Metal] Implement Xcode 16 RC changes. (#21229) 2024-09-13 19:29:18 +02:00
Rolf Bjarne Kvinge 0edba0ea68
[devops] Fix typo when killing the simdiskimaged service. (#21205) 2024-09-13 18:38:42 +02:00
Rolf Bjarne Kvinge a52f186066 [xcode16] Merge main into xcode16. 2024-09-13 15:53:38 +02:00
Rolf Bjarne Kvinge 5fd9438bde
[tools/install-source] Remove. (#21195)
This is legacy only, so we don't need it anymore.
2024-09-13 15:49:53 +02:00
Rolf Bjarne Kvinge 3245946fdc
[xtro] Remove all legacy Xamarin bits. (#21196) 2024-09-13 15:49:13 +02:00
Rolf Bjarne Kvinge d3c0f76ce6
[api-diff] Compute the API diff using public (stable) NuGet packages. (#21222)
Compute the API diff using the public (stable) NuGet instead of
downloading custom zip files.

Also remove all the legacy logic, and improve the README to explain the
process.

Note: the api diff won't work correctly in this PR (the comparison
against the previous commit won't be correct, because the previous
commit doesn't have the changes from this PR, which the new code
expects).
2024-09-13 12:16:27 +02:00
Rolf Bjarne Kvinge 99ce14daf7
[CoreMedia] Implement Xcode 16 RC changes. (#21226) 2024-09-13 12:15:21 +02:00
Rolf Bjarne Kvinge d698e42bb8
[devops] We must use the beta channel on xcode16. (#21227) 2024-09-13 10:41:16 +02:00
Rolf Bjarne Kvinge 9340a371d0
[runtime] Enable C++ standard library hardening. Fixes #20709. (#21230)
Apple recommends the "fast" mode for production code, and "debug" mode for
non-production, so we're mapping this to Release="fast" and Debug="debug".

References:

* https://developer.apple.com/xcode/cpp/#library-hardening
* https://libcxx.llvm.org/Hardening.html

Fixes https://github.com/xamarin/xamarin-macios/issues/20709.
2024-09-13 10:35:54 +02:00
Manuel de la Pena e993173a3c
[CI] Split the sim tests and the macOS tests. (#21215)
Resource triggers do an or on the stage, not and and. That means that
the tests pipelines are triggered once per stage. A way to solve this is
to split the tests and each of the pipelines will listen to specific
stage.
2024-09-12 17:16:09 -04:00
Rolf Bjarne Kvinge 096eca541b
[MediaExtension] Implement this new framework. (#21176) 2024-09-12 19:53:51 +02:00
Rolf Bjarne Kvinge 8a41217f73
[xcode16] Merge main into xcode16. (#21220) 2024-09-12 18:53:12 +02:00