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

1645 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge cd265f852c
[configure] Add an option to enable/disable install-source. (#8904)
Disable by default, but automatically enable for CI builds.

This makes running 'make install' with a fully built tree take ~8s instead of
20+s.
2020-06-22 10:26:21 +02:00
Manuel de la Pena 3cf2fc1316
[DevOps] Do not fail the tests is xamarin-storage cannot be reached. (#8912)
Try to create the folder in xamarin-storage, if that fails, rather than
stop with an error, execute the tests and st an env var.

Once the tests are complete, when adding the summaries, check if we did
fail to reach xamarin-storage and notify it.

This will make sure that tests won't fail if:

* xamarin-storage dies.
* bots are not in the vpn and could not reach xamarin-storage.
2020-06-19 20:18:35 -04:00
Manuel de la Pena 670d68c86c
[DevOps] Improve the comments added in GitHub. (#8898)
Comments were ugly. Clean a little the markdown.
2020-06-19 11:45:21 -04:00
Rolf Bjarne Kvinge 53c285c097
Merge pull request #8887 from rolfbjarne/dotnet-linker-generate-main
[dotnet] Generate a main function, and use it to compile the main executable.
2020-06-19 17:45:05 +02:00
Rolf Bjarne Kvinge c181d26ae4 Improve diagnostic output. 2020-06-19 17:41:04 +02:00
Manuel de la Pena 78730b8ceb
[DevOps] Update contexts to be more clear. (#8896)
The contexts are the ones that link a status with a device run. Update
them so that we do know the labe used (and remove a typo where we used
TvOS).
2020-06-18 17:10:01 -04:00
Manuel de la Pena 1b6b5dec20
[Devops] Use correct variables template on ddfun tvos pipeline. (#8895) 2020-06-18 15:28:47 -04:00
Manuel de la Pena 96e14746b3
[Devops] Fix typo in beta device pipeline. (#8894) 2020-06-18 15:15:37 -04:00
Manuel de la Pena ed8a00152e
[Devops] Add support for yaml pipelines in the old device pipelines. (#8862)
This commit moves all the different pipelines we have to fully use yaml.
That includes the old ddfun pipeline that was using a mix between using
yaml and the UI interface to configure it.

The new pipelines are found under the tools/devops/device-tests
directory. All of the use a very similar structure and therefore we use
a template. The README.md inside the directory should explain most of
the logic and the devices-tests.yml contains comments for each of the
steps.

Most of the bash scripts have been moved to use pwsh which is inside the
scripts directory and contains tests. Tests can be ran via:

```bash
make -C tools/devops/device-tests/scripts run-tests
```

This commit will only affect the ddfun pipeline that will need to be
updated to use the new yml path. All the other pipelines are not
affected and they will be to be updated manually.

The pipelines support two different storages for the html report.

* xamarin-storage: Old school.
* vsdrops: New age.

Unfortunatly we yet do not know how to workaround the fact that vsdrops
does not serve the files, therefore we use the xamarin-storage in all
pipelines but those in the ddfun lab because they do not have the right
access.

This later can be easily changed editing the
tools/devops/device-tests/tempaltes/cambridge-variables.yml which will
update all the pipelines in the cambridge lab.

PS: Sorry for the size.
2020-06-18 14:15:59 -04:00
Rolf Bjarne Kvinge 72bbee78c0 [dotnet] Load the output from the GenerateMain step into the MSBuild targets.
The GenerateMain step needs to return the generated filename to the MSBuild targets, and it does so by writing out MSBuild xml which is then loaded into the MSBuild logic.
2020-06-18 15:57:01 +02:00
Rolf Bjarne Kvinge 1401624e09 [dotnet-linker] Add a GenerateMain step.
This generates a very basic Main method that doesn't do anything at all.
2020-06-18 15:57:01 +02:00
Rolf Bjarne Kvinge c6abc2fea1 [dotnet-linker] Add CacheDirectory and ItemsDirectory to the linker configuration. 2020-06-18 15:57:01 +02:00
Rolf Bjarne Kvinge da1db99954 [dotnet-linker] Pass TargetArchitectures to the linker. 2020-06-18 15:52:16 +02:00
Rolf Bjarne Kvinge 197026622e [dotnet-linker] Add the MachO.cs file to get the Abi enum.
This also requires adding support for the ErrorHandler machinery, which the
MachO.cs file needs.

I considered extracting the Abi enum from the MachO.cs file, but it's used in
several places (including externally, such as binding-tools-for-swift), which
means this would be a rather disruptive change.

I also considered modifying MachO.cs to make it possible to build without the
ErrorHandler machinery, but since we'll need it all anyway eventually, I
decided against this option as well.
2020-06-18 15:52:16 +02:00
Rolf Bjarne Kvinge c3bcfac582
Unify code for executing processes. (#8848)
* Create a simple Xamarin.Utils.Execution class that can handle all our
  process execution needs:
    * Captures or streams stdout/stderr (in UTF8).
    * Supports async
    * Supports a timeout
    * Does not depend on any other source file we have, only uses BCL API.
* Have the execution helper classes from mtouch/mmp
  (Xamarin.BundlerDriver.RunCommand) and the tests
  (Xamarin.Tests.ExecutionHelper) use this new class.
* Some simplifications were made:
    * All API that took a string array for the environment now takes a
      Dictionary<string, string>.
    * The Driver.RunCommand methods were split out to a separate file. This
      file also contains a Verbosity field, which is conditioned on not being
      in mtouch nor mmp, which makes including this file from other projects
      simpler (such as bgen - in particular bgen was modified to use this
      Verbosity field instead of its own).
2020-06-18 12:34:07 +02:00
Manuel de la Pena 1d5557c328
[DevOps] Move away from a testing branch and use main. (#8874) 2020-06-17 12:59:44 -04:00
Manuel de la Pena a20f8ddcbe
[Devtools] Do not try to install tools via brew if present.] (#8872) 2020-06-17 11:27:26 -04:00
Rolf Bjarne Kvinge 95e42b9266
Rename master to main. (#8851)
* Fix links that point to master to point to main instead.
* Implement support in the sample tester for specifying the default branch for
  each sample repo.
* Fix various text / documentation to say 'main' instead of 'master.'
* Push to 'main' instead of 'master' in xamarin-macios-data.
* Fix xharness to make 'main' the special branch with regards to documentation tests as opposed to 'master'.
* Fix various CI to use 'main' instead of 'master'.
* Bump maccore

    New commits in xamarin/maccore:

    * xamarin/maccore@ed6d146822 Rename 'master' to 'main'. (#2233)

    Diff: 424fa26148..ed6d146822
2020-06-16 15:51:44 +02:00
Chris Hamons 78dcb51fe3
Remove notice from generated iOS Apps (#8857)
- The notice points to an out of date page, currently dead (will be redirected soon)
- https://github.com/xamarin/xamarin-macios/issues/8849 is the new home
2020-06-15 15:52:08 -05:00
Rolf Bjarne Kvinge 748612fbc2
[dotnet] Ship libxamarin.dylib and friends. (#8830)
* [dotnet] Ship libxamarin.dylib and friends.

Add libxamarin[-debug].[a|dylib] to the NuGets.

* [dotnet] Create a DOTNET_PLATFORMS variable in Make.config.

Create a DOTNET_PLATFORMS variable in Make.config and use it everywhere
instead of the PLATFORMS variable we were defining in multiple Makefiles.

Also move the creation of the DOTNET_<platform>_RUNTIME_IDENTIFIERS variables
from dotnet/Makefile to Make.config, it'll soon be needed elsewhere as well.

* [runtime] Conditionally include bits.

* Make the contents of the DOTNET_[PLATFORMS|RUNTIME_IDENTIFIERS] variables depend on the INCLUDE_[IOS|TVOS|WATCH] variables.
2020-06-15 17:47:18 +02:00
Chris Hamons 32c4999822
Add NOTICE.txt and cgmanifest tool (#8843)
- Add generated NOTICE.txt with hand included OpentTK license (https://github.com/mono/opentk/blob/master/Documentation/License.txt) not found by CG
- Add small dotnet core tool that updates cgmanifest.json based on new submodules/mono
- Internal User Story: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1140262
2020-06-12 14:30:21 -05:00
Sebastien Pouliot a1063fc1c3
[mmp] Update generated code for `main.c` (#8842)
* Remove old imports that are not needed anymore (left over from DRM days)
* Fix formatting (missing tab)
2020-06-11 13:46:02 -04:00
Rolf Bjarne Kvinge a6b55083ab
[apidiff] Fix range expression. (#8827)
The C# range expression is somewhat confusing: the lower bound is inclusive,
but the upper bound is exclusive. This means that [0..15] is 15 characters,
not the 16 characters we want here.

Fixes this during API comparison:

    System.ArgumentException: Byte array for GUID must be exactly 16 bytes long.
    Parameter name: b
      at System.Guid..ctor (System.ReadOnlySpan`1[T] b) [0x00111] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Guid.cs:66
      at System.Guid..ctor (System.Byte[] b) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Guid.cs:45
      at Merger.Process (System.String platform, System.String path, System.String os) [0x001d1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/apidiff/merger.cs:60
      at Merger.Main (System.String[] args) [0x00002] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/apidiff/merger.cs:94
    make[2]: *** [tvos-markdown] Error 1
2020-06-11 11:44:39 +02:00
Alex Soto 33868e4036
[devops] Add Policheck tool to our pipeline (#8800)
New commits in xamarin/maccore:

* xamarin/maccore@d2ef9d7ee0 Add PoliCheckExclusions.xml (#2228)

Diff: 4bfce64847..d2ef9d7ee0
2020-06-08 14:13:40 -04:00
Rolf Bjarne Kvinge d4bd5a5b4a
[mtouch] Remove empty comment tags from localization resx files. (#8781)
Solves build errors like this:

     xamarin-macios/tools/dotnet-linker/packages/xlifftasks/1.0.0-beta.20154.1/build/XliffTasks.targets(91,5): error : 'Errors.cs.xlf' is out-of-date with 'Errors.resx'. Run `msbuild /t:UpdateXlf` to update .xlf files or set UpdateXlfOnBuild=true to update them on every build, but note that it is strongly discouraged to set UpdateXlfOnBuild=true in official/CI build environments as they should not modify source code during the build.

See also: https://github.com/xamarin/xamarin-macios/pull/8157
2020-06-05 17:08:36 +02:00
Rolf Bjarne Kvinge 85e3113858
[dotnet-linker] Add support for passing configuration from the MSBuild targets to our linker steps. (#8780)
Add support for passing configuration from the MSBuild targets to our linker
steps using the linker's --custom-data option.

There are just two values being passed now, but this will grow significantly
over time as linker steps are implemented.
2020-06-05 16:04:53 +02:00
Sebastien Pouliot 97d2504d51
[tools] Remove MD5 from tooling (#8769)
Note: affected tools are not included in the code shipping inside the SDK

Usage of deprecated cryptographic algorithms is not approved anymore,
even if not used for cryptographic purpose.

MD5 was used to create immutable GUID since it's output is 128bits which
is just what a GUID wants as it's input (16 bytes). The same can be
achieved (even if a bit slower) with a newer/longer hash function

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1128148
2020-06-04 22:14:13 -04:00
Rolf Bjarne Kvinge 374f2cf293
[tools] Fix printing failed command to print the actual arguments instead of the list itself. (#8749)
Fixes this:

    Process exited with code 1, command:
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/xibuild/xibuild System.Collections.Generic.List`1[System.String]
2020-06-04 16:40:37 +02:00
Rolf Bjarne Kvinge 75e6aadb9f
[dotnet-linker] Fix dependency tracking in the makefile. (#8753)
* Use our shared *.csproj.inc target in mk/rules.mk.
* Include the *.csproj.inc target before the variable within is needed. That
  way the variable is what we need it to be (the list of dependencies for the
  assembly we want to build) when we reference it.
2020-06-04 15:45:17 +02:00
Rolf Bjarne Kvinge cb637a08a0
Merge pull request #8733 from rolfbjarne/dotnet-linker
[dotnet] Add dotnet-linker, a project to contain custom linker steps for our net5.0 build.
2020-06-03 09:11:15 +02:00
Rolf Bjarne Kvinge c06ece7276 Add some documentation. 2020-06-03 09:10:27 +02:00
Jonathan Peppers 4e37ecf65c
[msbuild] missing localization comments - part 3 (#8721)
Fixes: https://github.com/xamarin/xamarin-macios/issues/8468

Added missing `<comment/>` fields for:

* BI1033
* BI1077
* MM2007
* MT0073
* MT0074
* MT0112_c
* MT0113_i
* MT4146
* MT4162

I had to split up the `MT4162` error message, introducing:

* `Errors.MT4162_BaseType` - a base type of
* `Errors.MT4162_Parameter` - a parameter in
* `Errors.MT4162_ReturnType` - a return type in
* `Errors.MT4162_PropertyType` - the property type of

This also removed an argument passed into `string.Format`.
2020-06-02 13:57:11 -05:00
Rolf Bjarne Kvinge 3ecac56e8b
[mtouch/mmp] Add CFNetwork to our list of frameworks for iOS and macOS. (#8723)
It's already in the list for tvOS and watchOS.
2020-06-02 16:17:51 +02:00
Rolf Bjarne Kvinge 8b8b79ac40
[mtouch] Remove XAMCORE_2_0 define from simlauncher build. (#8725)
It's not used anywhere in the source code anymore.
2020-06-02 16:04:27 +02:00
Rolf Bjarne Kvinge fcd8956d70 [tools] Add dotnet-linker, a project to contain custom linker steps for our net5.0 build. 2020-06-02 15:55:56 +02:00
Rolf Bjarne Kvinge 52686eab6a [tools] Add support for generating a csproj dependency file for net5.0 projects.
* Add support for using dotnet instead of msbuild to build the target project.
* cd into the target project's directory before building it, because there may
  be a global.json file there which must be taken into account.
2020-06-02 15:50:35 +02:00
Connor Adsit 47f74578b3
satisfy the type-checking gods (#8680) 2020-05-27 08:49:37 +02:00
Rolf Bjarne Kvinge 8c1f33bde7
[tools] Ignore generator.csproj when comparing generated code. (#8675)
Fixes an issue where generator.csproj would show up as a new file when
comparing generated output.

This probably regressed in 4b917ad2de.
2020-05-26 16:20:53 +02:00
Rolf Bjarne Kvinge 641a26e64b
[mmp] Use the GetPlatformFrameworkDirectory function to avoid duplicating code. (#8648) 2020-05-25 09:34:22 +02:00
Rolf Bjarne Kvinge 4166908f3c
[linker] Fix typo in comment. (#8646) 2020-05-21 18:49:30 +02:00
Alex Soto 5dc1b55dc6
[master] Merge Xcode11.5 Support and include provisionator changes (#8643)
New commits in xamarin/maccore:

* xamarin/maccore@4bfce64847 Update README.md
* xamarin/maccore@24682998f7 [devops] Enhance Xcode renaming script (#2206)
* xamarin/maccore@e03f16b862 [Localization][Mlaunch] Fix watchos timeout issue (#2196)

Diff: ad1696d6f3..4bfce64847
2020-05-21 12:16:33 -04:00
Sebastien Pouliot 6ecce641a2
[linker] Remove code to deal with ExportedTypes (#8632)
This is now supported by upstream mono/linker
2020-05-21 08:44:48 -04:00
Rolf Bjarne Kvinge 4bd68fd653 Fix code style. 2020-05-20 19:59:04 +02:00
cadsit c3676e77b6 Check to see if the content has values (rather than being the empty string) 2020-05-20 13:36:19 -04:00
cadsit 12e644a6d9 page through github statuses for manifest URL 2020-05-20 13:06:02 -04:00
Rolf Bjarne Kvinge 1b570ebb20
[msbuild] Update to NUnit 3.12 and NUnit.ConsoleRunner 3.11.1. (#8613) 2020-05-20 09:26:05 +02:00
Rolf Bjarne Kvinge 392200d930
[mtouch/mmp] Share numerous command-line arguments. (#8599)
* [mtouch/mmp] Share Application.IsDualBuild, Is32Build and Is64Build.

* [mtouch/mmp] Share --tls-provider and --http-message-handler.

* [mtouch/mmp] Share --force.

* [mtouch/mmp] Share --cache.

* [mtouch/mmp] Share --nolink, --linksdkonly, --linkplatform and --linkskip.

* [mtouch/mmp] Share --i18n.

* [mtouch/mmp] Share --xml.

* [mtouch/mmp] Share --registrar and --runregistrar.

* [mtouch/mmp] Share --warn-on-type-ref.

* [mtouch/mmp] Share --sdk.

* [mtouch/mmp] Share --debug.

* [mtouch/mmp] Share --reference, and deprecate -r|--ref and -a|--assembly.

* [mtouch/mmp] Share --targetver, and deprecate mmp's --minos.

* [msbuild] Adjust tests after switching to use --reference instead of -r.

* Update according to review.

* [mmp] Remove --registrar:il.

The IL generator was what MonoMac had before the dynamic/static registrar code
got shared between MonoTouch and MonoMac. The IL registrar been gone for
years, and as far as I know nobody ever used --registrar:il, even though it
was provided as a compatibility option in the beginning (we still had the IL
registrar around for a while after adding the static+dynamic registrars, until
it was completely replaced by the dynamic registrar).

So just remove this option, if anyone ever used it they can replace it with
--registrar:dynamic.

* [mtouch/mmp] Keep bundler-specific code in its corresponding file.
2020-05-19 15:30:38 +02:00
cadsit ff3d5cbde6 quick fix provisionator directory nuking in device tests *facepalm* 2020-05-14 13:34:42 -04:00
Rolf Bjarne Kvinge 76fc9dc3bf
Improve our error handling code. (#8591)
* Move much of ErrorHandler.cs into a partial class in ErrorHandler.tools.cs,
  which is referenced by mtouch and mmp (but not our runtime).
* Add ErrorHandler.runtime.cs for runtime-specific bits, including a simpler
  version of ErrorHandler.Show. In particular this gets rid of the call to
  Environment.Exit, which should never happen at runtime.
* Rename MonoTouchException and MonoMacException to ProductException, which
  allows us to remove a lot of ifdefs.
* This required moving Application.LoadSymbols and Target.LoadSymbols to
  shared mtouch/mmp code.
2020-05-14 16:45:05 +02:00
Sebastien Pouliot f7b38340fd
[linker] Simplify MarkNSObject a bit (#8594)
also add a note that it's not optimal, as-is, if "Link All" is used since
it's too early to make a decision on overrides from user code, they could
be removed later (e.g. if the type is unused in the app).
2020-05-13 20:49:43 -04:00