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

13196 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge cfdccdc086
[devops] Upload binlogs from the tests run as well as the build. (#14458) 2022-03-25 16:38:02 +01:00
Rolf Bjarne Kvinge 43f87ec4c1
[msbuild] Only conditionally copy the entire input directory from Windows in the Ditto task. (#14495)
Sometimes we want to copy the entire input directory from Windows to the Mac
when executing the Ditto task remotely, and sometimes we don't.

In particular we do not want to copy the input directory when the directory on
Windows is an incomplete mirror of what's on the Mac - one scenario being when
copying the app bundle to prepare for IPA creation. The .app directory on
Windows is not complete - all the files are there (maybe? not quite sure, but
that's beside the point here), but some may be empty, because when we only
care about the timestamp for a file, we'll create an empty file on Windows to
mirror the actual file on Mac. Copying this incomplete directory to the Mac,
overwriting the correct files there, will break things badly.

However, sometimes we're not mirroring a directory on Windows, but instead we
have directories as actual build input (for instances frameworks from NuGets),
and in that case we want to copy everything to the Mac.

So this PR adds a parameter to the Ditto task to optionally copy the directory
from Windows for remote builds, and we enable this behavior when we want it -
specifically when copying frameworks.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1506009 while not
regressing https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1492635.

Ref: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1506009
Ref: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1492635
Ref: https://github.com/xamarin/xamarin-macios/pull/14375
2022-03-25 14:08:05 +01:00
dotnet-maestro[bot] 92272a12fe
Update dependencies from https://github.com/dotnet/installer build 20220323.2 (#14477)
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22168.1 -> To Version 6.0.300-preview.22173.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-25 09:07:50 +01:00
Rolf Bjarne Kvinge 2dd1c26f0e
[builds] Add a makefile target to print the pkg url for the current .NET we're using. (#14473) 2022-03-25 09:01:04 +01:00
Rolf Bjarne Kvinge 321f171744
[tests] Don't try to parse stderr from assetutil. Fixes #xamarin/maccore@2559. (#14478)
Hopefully fixes https://github.com/xamarin/maccore/issues/2559.
2022-03-25 09:00:44 +01:00
Rolf Bjarne Kvinge a1a4771448
[dotnet] Update doc about breaking nfloat changes and when we generate a global using directive. (#14487) 2022-03-25 07:40:23 +01:00
Manuel de la Pena 11bdf4b29b
[CI] Add missing variables needed to trigger the test selector. (#14488) 2022-03-24 18:07:32 -04:00
Rolf Bjarne Kvinge d95f2d15ad
[dotnet] Use a variable for 'net6.0' instead of hardcoding it. (#14481)
This makes it easier to bump to 'net7.0' when that time comes.
2022-03-24 16:41:29 +01:00
Manuel de la Pena b608e95645
[CI] Ensure that VS has the correct version of Xcode in all jobs. (#14480) 2022-03-24 11:02:14 -04:00
github-actions[bot] 73d1aebde8
[Localization] Pulling New Localization Translations 2017569189 (#14455)
* LEGO: Merge pull request 12848

LEGO: Merge pull request 12848

* LEGO: Merge pull request 12923

LEGO: Merge pull request 12923

* LEGO: Merge pull request 13022

LEGO: Merge pull request 13022

* LEGO: Merge pull request 13612

LEGO: Merge pull request 13612

* LEGO: Merge pull request 13638

LEGO: Merge pull request 13638

* LEGO: Merge pull request 14101

LEGO: Merge pull request 14101

* LEGO: Merge pull request 14327

LEGO: Merge pull request 14327

* LEGO: Merge pull request 14393

LEGO: Merge pull request 14393

* LEGO: Merge pull request 14406

LEGO: Merge pull request 14406

* LEGO: check in for Localization to temporary branch.

Co-authored-by: csigs <csigs@users.noreply.github.com>
Co-authored-by: CSIGS <csigs@outlook.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2022-03-24 09:05:42 -05:00
TJ Lambert 1727c6e305
[findersync] Add nullability to (generated and manual) bindings (#14451)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
2022-03-24 08:37:27 -05:00
TJ Lambert 87a399979e
[eventkitui] Add nullability to (generated and manual) bindings (#14423)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-24 08:36:44 -05:00
TJ Lambert e585d1d9e5
[eventkit] Add nullability to (generated and manual) bindings (#14422)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-24 08:36:07 -05:00
TJ Lambert 63c4223cac
[darwin] Add nullability to (generated and manual) bindings (#14419)
* Nullability enable

* throw better exceptions

* use is null and is not null

* Correcting Whitespace and using a better instance of null check

* use better null check

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-24 08:35:20 -05:00
TJ Lambert 8a265a086a
[corewlan] Add nullability to (generated and manual) bindings (#14414)
* enable nullability

* remove the != nulls

Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-24 08:33:24 -05:00
Rolf Bjarne Kvinge 78963700e7
[dotnet] Only add a global nfloat using if we're compiling for C# 10 or later. Fixes #14434. (#14475)
Fixes https://github.com/xamarin/xamarin-macios/issues/14434.
2022-03-24 10:14:16 +01:00
Rolf Bjarne Kvinge 64b07d513e
[msbuild/dotnet] Rework how we handle app bundle post processing. Fixes #14067. (#14335)
Change dSYM generation and native stripping to occur immediately before code signing,
in a newly minted post processing target.

Challenges:

* Both calling 'strip' and 'codesign' on an executable modifies that executable,
  which means that we must make sure to not call 'dsymutil' on the same binary at
  a later point unless it's been rebuilt.
* Thus we must make sure to update 'dsymutil's stamp file whenever we call 'strip'
  and/or 'codesign' on an executable.
* Just like for code signing, we must store the list libraries (either static or dynamic)
  we post process in extension/watch/rid-specific projects, so that these libraries
  can be loaded in containing projects and processed there.
* In universal .NET builds, debug symbols are created for the universal app bundle,
  not for each rid-specific version of the app bundle. So I had to add logic to create
  the native symbol lists (MtouchSymbolsList) for each rid-specific build, but then
  collect them and merge those lists for the universal app bundle.

The existing SymbolStrip call we did right after linking the native executable has
been removed, because we have to do that after creating the dSYM.

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/14067.
2022-03-24 10:13:24 +01:00
Rolf Bjarne Kvinge aa3d95ef22
[devops] Report if tests on older macOS bots time out. (#14438)
Also relax the requirement for GitHub comments to have a description, since we don't need to say more than that it timed out.

This is how it ends up looking: https://github.com/xamarin/xamarin-macios/pull/14438#issuecomment-1075451821
2022-03-23 22:35:39 +01:00
Rolf Bjarne Kvinge d9e3206125
Merge branch 'main' into dotnet-dsyms 2022-03-23 22:24:51 +01:00
Rolf Bjarne Kvinge 6e74f875d9
Apply suggestions from code review
Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2022-03-23 22:24:35 +01:00
Rolf Bjarne Kvinge 18fa252f1d
[msbuild] Show a better error when a bundle identifier isn't provided. Fixes #14283. (#14402)
Fixes https://github.com/xamarin/xamarin-macios/issues/14283.
2022-03-23 16:49:06 +01:00
dotnet-maestro[bot] 9e9f28a111
[main] Update dependencies from dotnet/runtime (#14315)
* Update dependencies from https://github.com/dotnet/runtime build 20220303.4

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

* Update dependencies from https://github.com/dotnet/runtime build 20220308.10

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

* Update dependencies from https://github.com/dotnet/runtime build 20220309.5

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

* Add feed for the System.Runtime.InteropServices.NFlaot.Internal package.

* Revert "Add feed for the System.Runtime.InteropServices.NFlaot.Internal package."

This reverts commit a394c48482.

* Update dependencies from https://github.com/dotnet/runtime build 20220310.4

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

* Update dependencies from https://github.com/dotnet/runtime build 20220310.4

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

* Update dependencies from https://github.com/dotnet/runtime build 20220311.8

Microsoft.NETCore.App.Ref
 From Version 6.0.3 -> To Version 6.0.4

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
 From Version 6.0.2 -> To Version 6.0.4 (parent: Microsoft.NETCore.App.Ref

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-23 16:31:28 +01:00
Mauro Agnoletti 0ddd7a6888
Updated Xamarin.Messaging version (#14472)
Updated to 1.5.8, including fixes for a hang in build cancellation during SayHello and also an improvement in the port forwarding logic when establishing the SSH connection
2022-03-23 09:12:50 +01:00
Rolf Bjarne Kvinge e44d0fd047
[.NET] Rename several DOTNET6_* variables to to DOTNET_*. (#14463)
Also rename DOTNET_VERSION to SYSTEM_DOTNET_VERSION to make it clear what it's
referring to (and to not clash with DOTNET6_VERSION which has now been renamed
to DOTNET_VERSION).

.NET 7 is right around the corner.
2022-03-23 08:07:34 +01:00
Manuel de la Pena 28b9d24b07
[CI] Undo a merge done by Github/VSTS when we do the checkout so that both jobs (build & test) use the same commit. (#14443) 2022-03-22 17:41:03 -04:00
Rolf Bjarne Kvinge d886a6d19b [tests] Update tests to cope with app extensions signed at a different moment during the build.
App extensions are now signed when the main app is signed (and not by themselves),
which means that in tests we can't assert that. So remove those asserts, and instead
add asserts to verify that app extensions are signed when the main app is signed.
2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge a2c3d7d225 [tests] We can't call dsymutil/strip on static libraries, so mark them as such. 2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge a04e653d24 [tests] Augment .NET tests to verify .dSYM presence at the end of a build 2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge 5e8bc0e7ee [msbuild] Remove the CollectFrameworks task, it's no longer used. 2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge e5c81564e2 [msbuild/dotnet] Rework how we handle app bundle post processing. Fixes #14067.
Change dSYM generation and native stripping to occur immediately before code signing,
in a newly minted post processing target.

Challenges:

* Both calling 'strip' and 'codesign' on an executable modifies that executable,
  which means that we must make sure to not call 'dsymutil' on the same binary at
  a later point unless it's been rebuilt.
* Thus we must make sure to update 'dsymutil's stamp file whenever we call 'strip'
  and/or 'codesign' on an executable.
* Just like for code signing, we must store the libraries (either static or dynamic)
  we post process in extension/watch/rid-specific projects, so that these libraries
  can be loaded in containing projects and processed there.
* In universal .NET builds, debug symbols are created for the universal app bundle,
  not for each rid-specific version of the app bundle. So I had to add logic to create
  the native symbol lists (MtouchSymbolsList) for each rid-specific build, but then
  collect them and merge those lists for the universal app bundle.

The existing SymbolStrip call we did right after linking the native executable has
been removed, because we have to do that after creating the dSYM (which the GenerateDebugSymbols
target does).

Also add tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/14067.
2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge 3550aa4837 [msbuild] Move spotlight indexing out to its own task.
Also establish when we should do post processing: only in the outermost build. This
is a slight change from previous behavior, where we'd run strip/dsymutil separately
for app extensions and watch apps.
2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge d0a45d1a75 [msbuild] Create a single target for post-processing (dsymutil/strip) an app bundle 2022-03-22 16:14:26 +01:00
Rolf Bjarne Kvinge 6c30c3ab22 [msbuild] Save/restore all the NativeReference metadata.
* Save all the NativeReference metadata in binding resource packages.
* Copy all the NativeReference metadata to new items when resolving native references.

This makes it possible to set custom metadata on NativeReferences, and have that
metadata show up when it's needed, which might not be in the same project (for instance
if the native reference is in a binding project, we might want the custom metadata
when we load the native references from the binding project's resource package -
another case is when app extensions have native references, we might want any custom
metadata in the main executable project to know how to handle certain types of native
references).

Also sort the metadata we write to binding resource packages, so that the output
is stable. This required updating the corresponding tests.
2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge 6e6c82b40e [msbuild] Make the ReadItemsFromFileBase task able to take multiple files as input. 2022-03-22 16:14:07 +01:00
Rolf Bjarne Kvinge 7d500da2bf
[msbuild] Rework code signing. (#14387)
The main theme here is that code signing will be done in the outermost
executable project, not in any app extension projects or watch projects, nor
during the RID-specific build of a .NET universal app. This makes codesigning
easier to reason about and other affected logic (such as strip/dsymutil)
easier to handle, in particular for .NET universal apps. Another benefit is
that the differences between the iOS and macOS code bases have been
eliminated.

The first step is to collect all the information we need from the targets
files. Every app bundle (be it app extension, watch app or main app) will add
its own output app bundle (.app/.appex) to the _CodesignBundle item group.
Then every app bundle will load this informarion from referenced app bundles,
and finally store this information on disk (in the 'codesign-bundle.items'
file). This means that in the end the main app bundle will have a list of all
contained app bundles in the app (recursively), in the _CodesignBundle item
group.

Separately we keep a list of other items that need signing, in the
_CodesignItems item group, and we do the same store/load logic for every
contained/contained app bundle (in the 'codesign.items' file, so a the end the
main app bundle will have a list of all the _CodesignItems for all contained
app bundles (recursively).

The previous steps occur in the _CollectCodesigningData and
_StoreCodesigningData targets.

The next step is to use the new ComputeCodesignItems task to compute
everything we need to know for code signing. This task takes over the
responsibility for listing all the *.dylib and *.metallib files, and the
*.framework directories in the app bundles, that need signing (which was
previously done in the targets file). This logic is significantly easier to
write, debug and test in C# than MSBuild.

In addition the ComputeCodesignItems also figures out a stamp file path we use
to determine if something needs (re-)signing. Previously .framework
directories did not have a stamp location, so they'd always end up resigned in
a rebuild, while now we'll automatically skip signing *.framework directories
unless something changed in them.

I've also tried to comment everything thorougly, for the next poor soul having
to deal with any bugs.

Behavioral differences:

* We were always signing *.dylib files for macOS. We're now doing the same
  thing for all platforms.
* We're now always signing *.framework directories for all platforms (like we
  do for *.dylib files), since frameworks are pretty much like dylibs anyways.

I've verified that this works both by running the submission tests and running
and launching a sample project on device from Windows.
2022-03-22 12:53:58 +01:00
dotnet-maestro[bot] 45b8df6860
[main] Update dependencies from dotnet/installer (#14395)
* Update dependencies from https://github.com/dotnet/installer build 20220311.20

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22161.20

* Update dependencies from https://github.com/dotnet/installer build 20220314.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22164.2

* Update dependencies from https://github.com/dotnet/installer build 20220315.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22165.2

* Update dependencies from https://github.com/dotnet/installer build 20220316.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22166.1

* Update dependencies from https://github.com/dotnet/installer build 20220316.14

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22166.14

* Update dependencies from https://github.com/dotnet/installer build 20220318.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.300-preview.22154.4 -> To Version 6.0.300-preview.22168.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-03-22 08:14:47 +01:00
Rolf Bjarne Kvinge e369f466f7
[dotnet] Rename the DOTNET6 make variable to DOTNET. (#14441)
This is the follow-up to where the DOTNET variable was renamed SYSTEM_DOTNET.
2022-03-21 15:56:57 +01:00
Rolf Bjarne Kvinge 4fadad76af
[tests] Add better diagnostics for failure to parse json document in AssetTest. (#14439)
Ref: https://github.com/xamarin/maccore/issues/2559
2022-03-21 12:15:36 +01:00
Rolf Bjarne Kvinge 0280c3d9f1
[tests] Augment TestRuntime.IgnoreInCI to detect Azure DevOps. Fixes #2557. (#14440)
Fixes https://github.com/xamarin/maccore/issues/2557.
2022-03-21 12:10:50 +01:00
Rolf Bjarne Kvinge bf05f39f37
[xtro] Unify the <platform>-CHIP.ignore files into a common-CHIP.ignore file. (#14401) 2022-03-21 10:16:07 +01:00
Steve Hawley d47dc8d63c
Nnyeah (#14426)
* Remove existing attributes

* Attribute Conversion

* First cut of code for review.

* Clean up csproj

* nullable enable and cleanup nullability. Compiles with no errors or warnings.

* typo

* Remove nullables with cleaner code, reworked things with Try...pattern.

* last couple '== null' changes
2022-03-18 15:54:15 -04:00
Rolf Bjarne Kvinge 5d36a7ed4a [msbuild] Make the ComputeCodesignItems task not copy anything between macOS and Windows.
The ComputeCodesignItems does not touch any files, and all the input files
should already exist on the mac, so there's no need to copy files back and
forth.
2022-03-17 16:19:00 +01:00
Rolf Bjarne Kvinge 31e883899f
[msbuild] Add support for 'EnableCodeSigning' for mobile projects. (#14379)
Mac Catalyst and macOS projects support an 'EnableCodeSigning' property to determine
whether an app is signed or not. In order to bring parity on mobile platforms, add
support for this property for iOS, tvOS and watchOS projects as well - if not set,
we'll still have the old behavior of signing device builds and not signing simulator builds.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-17 14:27:31 +01:00
Rolf Bjarne Kvinge d3643414e7
[dotnet] Rename the DOTNET make variable to SYSTEM_DOTNET. (#14416)
This makes it line up with our other make variables (SYSTEM_MSBUILD,
SYSTEM_MONO, SYSTEM_CSC, etc.), and also prepares for removing the version
from the DOTNET6 variable (so that it becomes just DOTNET).
2022-03-17 10:26:59 +01:00
Rolf Bjarne Kvinge b340e26595
Bump maccore. (#14417)
New commits in xamarin/maccore:

* xamarin/maccore@8287d19786 [submission] Only be optionally quiet.
* xamarin/maccore@5fe27fdd36 [submission] Add makefile target to add all the certs.
* xamarin/maccore@98670dcf31 [submission] Write results as tests are executed.

Diff: 696db0a953..8287d19786

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-03-17 10:16:31 +01:00
Rolf Bjarne Kvinge 4d26b780c7
Bump the min macOS version to 12.0. (#14427)
Because that's what Xcode 13.3 requires.
2022-03-17 10:13:36 +01:00
Rolf Bjarne Kvinge 2afb9fc40e
[tests] Print labels after each MSBuild test when running from the command line. (#14428)
The advantage of writing the label after each test is that the test result will also
be printed, which means it's possible to see if any tests failed during the test
run, as opposed to having to wait until the entire test run is completed (which can
take a while) to realize that pretty much every test failed with some silly mistake
which could have been quickly fixed before re-running the tests.
2022-03-17 10:12:32 +01:00
Rolf Bjarne Kvinge ee60f025ba
[tests] Improve an assert message slightly. (#14429) 2022-03-17 10:07:32 +01:00
Rolf Bjarne Kvinge 1c261ff741
[tests] Make a few .NET tests a bit less noisy. (#14430) 2022-03-17 10:02:39 +01:00
Rolf Bjarne Kvinge 8b445936a3
[devops] Fix typo in step name. (#14433) 2022-03-17 09:36:44 +01:00