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

2547 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 02598ae1f3
[CI] Unify all the setup steps in a template. (#13835) 2022-01-21 21:31:35 -05:00
Manuel de la Pena d442e95079
[CI] Increate timeouts when reporting a device result. (#13841) 2022-01-21 21:31:00 -05:00
Manuel de la Pena 8c977fd52f
[CI] Parallel api diff (#13819)
If the lab has good capacity it reduces the PR build time by 10% by adding a new job and run the api diff in parallel.
2022-01-21 08:27:49 -05:00
Manuel de la Pena fa03429221
[CI] Call agent cleanser on device bots. (#13810) 2022-01-20 21:42:04 -05:00
Manuel de la Pena df1bc375c3
[CI] Allow to optionally skip API diff. (#13809)
Allow to skip it for several reasons:

1. We might want to seepd up a build during a release.
2. We want to make the build.yml template for pflexible, later we will
   have to instances, one for the diff one to run tests and build.
   Running those in parallel should buy us an hour in the total build.
2022-01-20 17:07:24 -05:00
Manuel de la Pena 543627e8e7
[CI] Bootstrap dotnet. (#13797) 2022-01-20 09:37:20 -05:00
Manuel de la Pena 300ecb3139
[CI] Allow to run macOS without devices. (#13785) 2022-01-19 11:35:36 -05:00
Manuel de la Pena 3e7330e559
[CI] Do not add not needed data in the device test comments. (#13743) 2022-01-18 10:49:53 -05:00
Manuel de la Pena 0fd461db67
[CI] Add missing warning and list element. (#13744) 2022-01-18 10:48:05 -05:00
Rolf Bjarne Kvinge 6564841c6a Merge remote-tracking branch 'origin/main' into dotnet-resolvedfiletopublish 2022-01-14 11:00:16 +01:00
Rolf Bjarne Kvinge 8cc4f3e6f8 [devops] Give our entire test run another 2 hours to complete. 2022-01-14 11:00:10 +01:00
Manuel de la Pena 3801e688bb
[CI] Refactor the artifacts parsing. (#13711) 2022-01-13 19:24:12 -05:00
Manuel de la Pena 1109fcea3a
[CI] Invert if to workaround a bad variable expansion. (#13698)
This is weird bug in the agent code.
2022-01-13 11:38:18 -05:00
Manuel de la Pena c5fb5dfa34
[CI] Refactor code out to a function. (#13672)
Make the code more readable, this is the first step to clean the scripts
and to be able to add a switch so that we can diff between comments for
device tests and general comments.
2022-01-12 20:09:26 -05:00
Manuel de la Pena 17fbe27c1a
[CI] Clean the WriteDiff function to follow the pwsh style. (#13674)
* Function names are {Verb}-{Action}
* Params start with a uppercase
* Function does not need to be exported, it is internal to the module.
2022-01-12 11:34:47 -05:00
Manuel de la Pena cea0cae2bf
[CI] Fix comment aligment and add a warning sign. (#13671)
Fix the comment so that it does not look like
94863148dc (commitcomment-63453915)
2022-01-11 19:50:30 -05:00
Manuel de la Pena db4b4548ea
[CI] Add missing env. (#13670) 2022-01-11 19:50:13 -05:00
Manuel de la Pena 33a41c6fe3
[CI] Upload the agent logs as an artifact. (#13667) 2022-01-11 19:48:32 -05:00
Manuel de la Pena 345f7a367e
[CI] Allow to retrieve the logs of the agent. (#13662) 2022-01-10 17:07:43 -05:00
Manuel de la Pena 94863148dc
[CI] Fix device tests (#13657)
Allow device tests to run. Tests do not pass yet, that has to be fixed in xharness.
2022-01-10 11:48:34 -05:00
Manuel de la Pena 148ab8cbe1
[CI] Use the correct dependency variable. (#13660) 2022-01-10 11:46:43 -05:00
Manuel de la Pena b52af4b4f9
[CI] Fix mac tests yaml error (#13653) 2022-01-06 16:25:28 -05:00
Manuel de la Pena 3f43eef35b
[CI] Add missing env. (#13570) 2021-12-15 08:55:01 -05:00
Rolf Bjarne Kvinge 69015b3cec
[dotnet] Honor 'TrimMode' to specify linker behavior if LinkMode/MtouchLink aren't set. Fixes #13518. (#13543)
* Change dotnet-linker to only care about whether we're actually trimming anything or not.
* Allow LinkMde/MtouchLink to not be set if TrimMode is set.
* Detect if any assemblies are linked or not by checking the global TrimMode
  property + any TrimMode properties on assemblies.

Fixes https://github.com/xamarin/xamarin-macios/issues/13518.
2021-12-15 09:27:00 +01:00
TJ Lambert b72ef031f7
[ApiDiff] Add Current PR Diffs in a similar style as API Diffs (#13512) 2021-12-14 22:19:36 -06:00
Manuel de la Pena 06bacc24a4
[CI] Allow to force a build to be usable for insertions. (#13563)
This change allows to have a parameter (false by default) that allows to
get a build to be able to do an insertion even when it is comming from a
not predefined branch.

Uses cases:

1. Trigger a buiild with no tests from a special branch to insert.
2. Work with the CI to test the deployment.
2021-12-14 18:08:59 -05:00
Manuel de la Pena 5c68aca748
[CI] Rearrange the parameters so that we have all booleans grouped. (#13564)
The UI uses the order in which the parmaeters are found in the file,
which makes it look ugly because it adds a text bos ni between all
options.
2021-12-14 17:19:33 -05:00
Manuel de la Pena bffe61eec2
[CI] Fix indentation mistake that made timeouts result in errors. (#13552) 2021-12-14 09:27:40 -05:00
Manuel de la Pena 97ca13a358
[CI] Do not use the ciBuild tag for cronjobs. (#13553)
The tag is used by the release pipeline to indentify builds that we can
release from. This will ensure we do not get releases from the cronjobs.
2021-12-14 09:27:18 -05:00
Rolf Bjarne Kvinge 7b753916d8
[dotnet-linker] We must store the availability attributes when linking. (#13547)
We must store the availability attributes when linking, so that the registrar
can access them when the linker is done linking the app.

Fixes this test failure:

* Xamarin.Registrar.MT4162_dotnet(iOS,"iOS",LinkAll)

Ref: https://github.com/xamarin/xamarin-macios/issues/13517
2021-12-14 08:20:05 +01:00
Rolf Bjarne Kvinge ce7e49d9df
[dotnet-linker] Touch the build output to avoid make confusion. (#13549)
Make gets confused sometimes if running a rule doesn't update the timestamp of
the target of those rules (and make may in certain cases end up with an
infinite loop).

Avoid this by making sure to always update the timestamp of the
dotnet-linker.dll we build, even if MSBuild decides no re-compilation was
necessary.
2021-12-14 08:19:41 +01:00
Rolf Bjarne Kvinge c85d7721d5
[dotnet] Pass -dead_strip to the native linker when we can. (#13541)
Pass -dead_strip to the native linker like we do for legacy Xamarin:

* If there are no custom linker arguments.
* If all third-party bindings in the app has SmartLink = true (this doesn't
  show up in the PR, but the logic exists for legacy Xamarin and is already
  executed for .NET, the resulting Application.DeadStrip value just wasn't
  taken into account).

This shrinks the app size a bot for a Hello World app:

* Before:     10.659.731 (https://gist.github.com/rolfbjarne/b5892a5c7fb8663d38e2b69f67bce90c)
* After:       9.940.240 (https://gist.github.com/rolfbjarne/8404394180fb9971bd2f1475b747c70a)
* Difference:   -719.491 (-6.7 %)
2021-12-13 20:41:43 +01:00
Manuel de la Pena bf26c64e72
[CI] Add missing import directive. (#13537) 2021-12-11 14:25:24 -05:00
Manuel de la Pena dee9381b4b
Revert "[CI] Use Build artifacts so that they are copied to the release pipeline. (#13501)" (#13538)
This reverts commit 3977d7531d.
2021-12-11 14:25:14 -05:00
Manuel de la Pena 9a07446244
[CI] Add a better comment when we add code in the static page. (#13528) 2021-12-10 08:25:09 +01:00
Manuel de la Pena 5c4db77a15
[CI] Increase timeouts so that we do not have failures. (#13529)
We have added more files and the API seems to take long sometimes,
increase the timeouts to avoid failures like in https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=5532523&view=logs&j=704af8c3-a112-593d-cee6-636e1ea22709&t=62b5d5ee-dc4f-530c-7279-a3bef6bd6bc7
2021-12-10 08:24:42 +01:00
Rolf Bjarne Kvinge a94e575806
[tools] Unify Application.link_flags and Application.gcc_flags from mtouch and mmp into Application.CustomLinkFlags. (#13509)
* [tools] Unify Application.link_flags and Application.gcc_flags from mtouch and mmp into Application.CustomLinkFlags.

* [tests] Update mtouch tests according to mtouch changes.
2021-12-09 17:16:45 +01:00
Manuel de la Pena eb7bb62b6b
[CI] Check that the mac tests are indeed present. (#13510)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-12-08 17:14:19 -05:00
Rolf Bjarne Kvinge 90b8e89859
[src] Remove System.nint and System.nuint from .NET. Fixes #10508. (#13490)
* Remove System.nint and System.nuint from .NET
* Add support for C#'s nint/nuint types to the generator.
* Accept IntPtr/UIntPtr as target types for BindAs attributes for NSNumber conversions.
* Fix a few APIs to take/return NativeHandle instead of IntPtr.

Fixes https://github.com/xamarin/xamarin-macios/issues/10508.
2021-12-07 21:12:46 +01:00
Manuel de la Pena aff9d1902c
[CI] Remove all macOS Mohave. (#13508) 2021-12-07 14:41:06 -05:00
Manuel de la Pena 3977d7531d
[CI] Use Build artifacts so that they are copied to the release pipeline. (#13501) 2021-12-07 12:11:08 -05:00
Manuel de la Pena 8ec686c333
[CI] If we could not create a gist do not throw an error. (#13483) 2021-12-03 17:41:29 -05:00
Manuel de la Pena d0f5e32862
[CI] Move to use the job not the stage. (#13495) 2021-12-03 13:36:33 -05:00
Manuel de la Pena 598261e73d
[Make] Remove targets that are not longer needed and dependencies. (#13485) 2021-12-03 11:37:01 -05:00
Rolf Bjarne Kvinge 23ac0f520f [registrar] Accept IntPtr/UIntPtr as target types for BindAs attribute for NSNumber conversions. 2021-12-03 08:02:49 +01:00
Rolf Bjarne Kvinge f8b6699ab2 Merge remote-tracking branch 'origin/main' into arm64-sim 2021-12-02 09:38:36 +01:00
Rolf Bjarne Kvinge 5cc92ac564
[src] Add a new ObjCRuntime.NativeHandle type to represent native handles for .NET. Fixes #13126. (#13356)
Add a new struct, ObjCRuntime.NativeHandle, which will be used to represent
native handles for .NET (instead of using IntPtr). The main purpose is to be
able to use 'nint' as a number in API while not being prevented from using
native handles as well.

One example is NSMutableString, which has a constructor that takes a single
'nint capacity' parameter. With this change, we'll also be able to have a
constructor that takes a native handle in .NET - otherwise we'd have two
constructors with the same signature, because a C# 'nint' is just an 'IntPtr'.

This change required numerous changes pretty much everywhere. The work is
split up in commits as well as I was able to, and each commit explains what it
does.

Fixes https://github.com/xamarin/xamarin-macios/issues/13126.
2021-12-02 08:38:39 +01:00
Rolf Bjarne Kvinge 006bb5a7a0
[apidiff] Remove logic referencing the Mac Catalyst version of Xamarin.iOS.dll. (#13476)
We don't create a Mac Catalyst version of Xamarin.iOS.dll anymore, so there's
nothing to run an api diff on.
2021-12-01 17:27:18 +01:00
Rolf Bjarne Kvinge 3bb83a5a27 [tool] Use dlsym by default in the simulator to look up native functions. 2021-11-30 18:20:43 +01:00
Rolf Bjarne Kvinge 7d37ff3117 [tools] Change Application.IsAOTCompiled return true if we're targetting arm64 on a simulator 2021-11-30 18:20:43 +01:00