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

2560 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e0f5cede53
[tools] Remove XAMCORE_4_0 condition in linker source. (#14091)
Thinks are working fine as-is (with this XAMCORE_4_0 variable set to false),
and I see no particular reason in the code to change it, nor does the original
implementation explain much (b2bcad7a94).

So just remove this XAMCORE_4_0 condition as if it had never existed.
2022-02-08 10:38:49 +01:00
Manuel de la Pena 825c7fd55f
[CI] Move to the new sdk-insertions workload. (#14079) 2022-02-07 11:38:28 -05:00
Rolf Bjarne Kvinge ef3b05478e
[tools/runtime] Enable exception marshalling by default for all platforms in .NET. (#14051)
When exception marshalling was originally implemented, for backwards
compatibility concerns it was only turned on by default for platforms that
really needed it (watchOS).

However, exception marshalling is by far the safest option, so in .NET we're
enabling it by default for all platforms (it's still possible to disable it
for those who wants to).

Ref: https://docs.microsoft.com/en-us/xamarin/ios/platform/exception-marshaling
2022-02-07 14:12:32 +01:00
Rolf Bjarne Kvinge 42c87ab2f7
[runtime] Make Runtime.Arch a readonly field in .NET. Fixes #5518. (#14076)
* Make Runtime.Arch a readonly field.
* Tell the AOT compiler Runtime.Arch is a constant value.
* Tell the linker to stub out the method we use to fetch the current
  architecture from native code (it turned out a bit complicated to set the
  Arch field when it's readonly - the solution I came up with was to call a
  P/Invoke).

Test case (size of the main executable): link all (debug)

* Before:  33.522.704 bytes
* After:   33.506.112 bytes
* Difference: -16.592 bytes (-0.05 %)

There were no size differences in release mode, nor were there any size
differences in the "don't link" test, neither for debug nor release mode.

Fixes https://github.com/xamarin/xamarin-macios/issues/5518.
2022-02-07 08:05:41 +01:00
Sebastien Pouliot 40acce48d9
[objcruntime] Remove `SupportsModernObjectiveC` from the registrar (#13954)
Since 32bits macOS support was dropped this is always `true` so it is not
needed anymore.
2022-01-28 10:10:22 +01:00
Manuel de la Pena 5f8eb5438d
[CI] Fix upload to azure. (#13877)
A recent change missed that pwsh does not like a ending ',' while we use
it in csharp.
2022-01-25 11:32:12 -05:00
Manuel de la Pena 7a40f26320
[CI] Fix a broken CI when we skip the api diff. (#13869) 2022-01-25 09:11:21 -05:00
Manuel de la Pena 70254d822d
[CI] Allow to skip ESRP to help speed up the CI testing. (#13868) 2022-01-25 09:11:03 -05:00
Manuel de la Pena 426b1beaa3
[CI] Improve the upload script to help with SBOM (#13860) 2022-01-25 09:08:05 -05:00
Manuel de la Pena 115332f729
[CI] Unify the cleaning of the bots. (#13859) 2022-01-24 17:44:25 -05:00
Manuel de la Pena 4fe9874cc8
[CI] Use correct pwd for the device bots. (#13858) 2022-01-24 11:30:03 -05:00
Manuel de la Pena 67a6e82990
[CI] Do not result in a build failure if we cannot remove the ui promt. (#13857) 2022-01-24 09:45:43 -05:00
Manuel de la Pena d0519351e8
[CI] Use old signing when running on a PR. (#13419) 2022-01-21 21:32:04 -05:00
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