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

3987 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0674debc74
[devops] Clean up before and after running the Windows tests remotely. (#21454)
Also collect any crash reports from the remote machine.
2024-10-16 21:59:59 +02:00
Rolf Bjarne Kvinge 12e1e3308a
[devops] Make the prepare-for-remote-tests.sh script callable locally. (#21455)
A dual-purpose script is always better than a single-purpose script!

This also removes a dependency on 'xamarin-macios' being the repository
name.
2024-10-16 21:59:52 +02:00
Rolf Bjarne Kvinge 23dffef8c4
[xharness] Remove a lot of legacy code. (#21419) 2024-10-16 19:07:09 +02:00
Rolf Bjarne Kvinge a123e460f5
[watchOS] Remove the build logic for watchOS. (#21440) 2024-10-16 12:30:13 +02:00
Rolf Bjarne Kvinge 34d1fca7f6
[StoreKit] Bind AppStore.requestReview. Fixes #21410. (#21441)
The existing Objective-C class to request an App Store review (SKStoreReviewController) is deprecated in Xcode 16+, and it doesn't even work on the corresponding OS versions.

The replacement API is Swift-only, but luckily it's a very simple API (just a static method), so it's possible to bind it manually.

This required a few other changes/improvements:

* Add support for Swift code in our runtime.

* Just to keep the changes to a minimum, bump the min OS version for legacy code to match the .NET min OS versions. This is because our build logic uses the legacy min versions when compiling native code (a more involved fix would be to update all the build logic to build native code to use the .NET min OS versions, but that's not the point of this PR, so I took the easy route). Fixes #10659.

I've tested the method locally, and it seems to work fine, but I've still marked
it as experimental for now. There are no unit tests because calling the method will
put up a dialog, which won't work correctly in unit tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/21410.
Fixes https://github.com/xamarin/xamarin-macios/issues/10659.
2024-10-16 11:06:47 +02:00
Manuel de la Pena 6abfff6890
[CI] Remove the APIScan stage since we have a pipeline to run it. (#21432)
In the process of ensuring that we can run tests a single time, we are
removing all extra stages from the CI. We have move the APIScan to the
following pipelines.

- CI Pipeline:
https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24050
- PR Pipeline:
https://devdiv.visualstudio.com/DevDiv/_build?definitionId=24049
2024-10-15 10:00:20 -04:00
Rolf Bjarne Kvinge 209de6f297
[devops] Fix calling the show_bot_info.ps1 script. (#21428) 2024-10-15 09:25:44 +02:00
Rolf Bjarne Kvinge 395aca6e74
[compare-commits] Simplify comment about unclean working directory. (#21433) 2024-10-15 09:24:29 +02:00
Manuel de la Pena 57380a58b8
[CI] Fix the download step (#21398)
Allow to download the artifacts from the build that triggered the
pipeline.
2024-10-13 17:17:29 -04:00
Rolf Bjarne Kvinge 0482be8bd3
[devops] Remove the msitools dependency. (#21415)
According to @pjcollins the msi files we were generated aren't used
anywhere, so this should be safe.
2024-10-11 16:34:16 +02:00
Rolf Bjarne Kvinge 48f5591829
[devops] Improved diagnostics and implement deadlocked process termination. (#21317)
* Unify the code to collect diagnostic information about a bot.
* Unify some of the cleanup code to prepare a bot as well.
* Implement code to terminate processes on a bot that's used more than a day
  of CPU (presumably these processes are stuck for some reason).
2024-10-11 13:26:45 +02:00
Rolf Bjarne Kvinge 657f0169c5
[tools] Ignore any interpreter settings when the current runtime isn't MonoVM. Fixes #20398. (#21406)
Tests that exercise this code path will be included in a different PR.

Fixes https://github.com/xamarin/xamarin-macios/issues/20398.
2024-10-11 09:32:15 +02:00
Rolf Bjarne Kvinge 22cb6e8cb2
[devops] Remove the wget dependency. (#21405)
It doesn't look like it's used anywhere (and I don't have it on my system either).
2024-10-11 08:37:41 +02:00
Rolf Bjarne Kvinge d293744125
[devops/github] Update a few things for .NET 10. (#21392) 2024-10-10 14:26:41 +02:00
Rolf Bjarne Kvinge 9daafdae64
[builds] Remove all legacy logic. (#21307)
We still need some of the source files from the legacy Mono library, but it's
only a few files, so just add them to the git repo.

Also implement caching of the .NET download, which speeds up clean rebuilds
significantly.

Note: all the files in the `builds/mono-ios-sdk-destdir` are a straight import
from the Mono archive, so those shouldn't need much reviewing (nor will I
change them unless absolutely necessary).
2024-10-10 14:21:42 +02:00
Rolf Bjarne Kvinge 953a2b4564
[src] Remove legacy build logic. (#21353) 2024-10-10 11:26:25 +02:00
Rolf Bjarne Kvinge 7781c5184e
[system-dependencies] Remove the cmake dependency. (#21375)
It was needed to build Mono from source, which we haven't done in quite
a few years now.
2024-10-10 11:23:39 +02:00
Rolf Bjarne Kvinge 5affb0b4e9
[tests] Remove legacy logic to package and run macOS tests. (#21384) 2024-10-10 09:41:56 +02:00
Manuel de la Pena 0db186c758
[CI] Move the release steps to a new pipeline. (#21383)
This new pipeline will only be executed when the CI build is completed
by any of the branches that have been listed to be included in the
trigger.

This pipeline because it does a release has to extend the 1ES template.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-10-08 12:37:10 -04:00
Manuel de la Pena 85b7f563bb
[CI] Fix errors in the new apiscan pipelines. (#21385)
Allow the pipeline to run correctly. We could not test it before we
landed the yaml, this commit fixes all the issues we have.
2024-10-08 12:21:31 -04:00
Manuel de la Pena 4544df6755
[CI] Stop building classic pkgs. (#21382) 2024-10-07 14:56:07 -04:00
Manuel de la Pena c0c457e32b
[CI] Intermediate step to move the api scan out of the build. (#21357)
Due to the way that resource triggers are implemented in VSTS, we are
triggering tests more than once. To solve the issue, we need to move the
diff stages to different pipelines. This is the first step to allow use
to get less stages in the build so that we can reduce the number of
tests that are triggered.
2024-10-07 14:55:07 -04:00
Manuel de la Pena 1dc54f6241
[CI] Remove stages related to the old pkg signing and notarization. (#21376)
Clean the CI from all references to the old pkg notarisation and
signing.

- Remove the templates that did the jobs.
- Remove the parameters that allowed to skip the signing and
notarisation.
- Remove the references to the scripts.

This simplifies greatly the yaml.
2024-10-07 09:14:28 -04:00
Manuel de la Pena 8bb8f6f82c
[CI] Split variables to reduce needed rights. (#21371)
Split the variables and document their usage. Because we are going to
have to add more pipelines we want to limit the amount of secrets a new
pipeline requests and uses.

The split is as follows:

- variables/common.yml: needed by all.
- variables/api-scan.yml: needed by the api scan pipeline.
- variables/signing.yml: needed by pipeline that need to perform
signing.

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-10-04 16:09:10 -04:00
Rolf Bjarne Kvinge f1fbfc07f6
Merge branch 'main' into dev/rolf/merge-net9.0-into-main 2024-10-02 19:52:40 +02:00
Manuel de la Pena 5a0d412c87
[CI] Use the full path for triggering resources. (#21338)
VSTS recommends this in their docs. We are going to do it to make it
simpler to track what triggers what.
2024-10-01 15:42:37 -04:00
Rolf Bjarne Kvinge 9647b45ce4 Merge remote-tracking branch 'origin/net9.0' into merge-net9.0-into-main 2024-10-01 17:03:30 +02:00
Rolf Bjarne Kvinge 88310119fd
[devops] Rework how we hide GitHub comments. (#21320)
* Whenever we add a GitHub comment, also provide a comment id.
* When adding a GitHub comment, use that comment id to hide any previous comments with the same id.

It turns out this simplifies the code a lot, and additionally we now correctly
hide every comment we report whenever a step or stage is re-executed.
2024-10-01 14:44:09 +02:00
Rolf Bjarne Kvinge fc9d73b761
[devops] Unify and simplify provisionator provisioning. (#21268)
This should speed up getting bots ready, since now we only run the
provisionator once for each bot, and we also don't try to provision the
same thing multiple times.
2024-09-27 18:19:03 +02:00
Rolf Bjarne Kvinge 3790cbda5a
[devops] Add a bit more info when showing the enviroment. (#21311)
Also show:

* The network configuration
* The load on the system / cpu usage (top)
2024-09-27 17:17:32 +02:00
Rolf Bjarne Kvinge 1dfff82b85 [devops] Don't do anything on macOS 11 anymore.
Our min macOS version is 12.0.
2024-09-27 11:19:55 +02:00
Rolf Bjarne Kvinge 852496d5de
[devops] Only fetch the exact remote branches we need to undo the GitHub merge. (#21266)
This will typically save between 1 and 2 minutes for every test run.

But potentially much more if GitHub happens to be slow:

```
[...]
Working on a PR, Undoing the github merge with main.
##[error]The task has timed out.
[...]
```
2024-09-27 10:16:56 +02:00
Manuel de la Pena fbe8fe395c
Merge branch 'main' into dev/rolf/bump-main-in-net9.0-2024-09-24 2024-09-26 16:28:33 -04:00
Manuel de la Pena 6df33a86bb
[CI] Fix the pipeline that runs the macOS tests.
Fixed several issues with te yaml:

* Missing config stage.
* Missing parameters,
* Hitting the same bug as Uno here: https://github.com/unoplatform/uno/pull/18243 related to https://github.com/microsoft/azure-pipelines-tasks/issues/17207



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-09-26 16:19:07 -04:00
Manuel de la Pena ca9419af81
[CI] Add missing configuration stage for the macos tests pipeline. (#21303) 2024-09-25 20:46:22 -04:00
Rolf Bjarne Kvinge cabb3e5e5e
[tests/devops] Remove logic to build samples. (#21267)
It's old, hasn't been executed in years and quite bitrotten by now (it only
builds legacy Xamarin samples for instance).

We could port it to .NET, but first we'd need sample apps, and there
aren't many of those yet.
2024-09-25 17:51:24 +02:00
Rolf Bjarne Kvinge d588d3d2cd
[devops] Remove some dead code. (#21269) 2024-09-25 17:50:59 +02:00
Manuel de la Pena c925668f68
Revert "Revert "[CI] Split the sim tests and the macOS tests. (#21215)"" (#21301)
Reverts xamarin/xamarin-macios#21247 

This is a revert of a revert that was not needed.
2024-09-25 11:40:20 -04:00
Rolf Bjarne Kvinge 1a4f376b74 [net9.0] Merge main into net9.0. 2024-09-24 23:57:47 +02:00
Rolf Bjarne Kvinge 6af5fdf4d9
[devops] Improve environment dumping. (#21271)
* Dump once, but correctly sorted, taking values with newlines into account.
* Dump the bot's IP address as well.
2024-09-24 17:28:38 +02:00
Rolf Bjarne Kvinge 16a6284e58
[devops] Append to the agent log, instead of creating the file. (#21281)
Append to the agent log, instead of creating the file, when an exception occcurs.

The problem is that creating the file fails if it already exists:

    Exception occurred: Exception calling "Parse" with "1" argument(s): "String '' was not recognized as a valid DateTime."
    New-Item: /Users/builder/azdo/_work/4/s/xamarin-macios/tools/devops/automation/scripts/generate_agent_logs.ps1:52
    Line |
      52 |      New-Item -Path $Output -Value "$_"
         |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         | The file '/Users/builder/azdo/_work/4/s/agent-logs.log' already exists.
2024-09-20 17:44:57 +02:00
Rolf Bjarne Kvinge ba954b9c24
[builds] Delete most of the legacy logic. (#21239) 2024-09-20 17:44:15 +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 cc1412c67b
Merge xcode16 into main. (#21260) 2024-09-19 08:57:07 +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
Alex Soto 1a006c9600 [xcode16][ci] Move CI to use stable bots 2024-09-18 17:42:06 +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 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