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

37 Коммитов

Автор SHA1 Сообщение Дата
Matthew Leibowitz e84ba47396
Upgrade to VS2019 and .NET Core 3.0 (#1030)
* Upgraded a good few things
 - multitargeting for netstandard1.3, netstandard2.0, netcoreapp3.0 and net45
 - iOS, tvOS, macOS, watchOS now builds on non-macOS (not embedded binaries)
 - removed empty assembly infos
 - using Directory.Build.* to clean up a few things
 - improved the msbuild tasks to properly skip
* Add the targets file to the nuget
* Let all the tests run before failing the build
* Pack and validate in one go
* Update the samples to use the new projects
* Use VS 2017 for native builds for now
* Update Dockerfiles
* removed references from Views.WPF to OpenTK #1029 (#1078)
* Install the type redirector
* Update depot_tools
* Don't do any signing for macOS

Co-authored-by: Tyson Williams <34664007+bender2k14@users.noreply.github.com>
2019-12-22 18:50:47 +02:00
Matthew Leibowitz dc9b306e28
Improve native build process + add Nano Server (#1040)
* Add Nano Server to the list (Fixes #676)
* Make separate cake files for native builds
2019-12-04 03:12:12 +02:00
Matthew Leibowitz ba40045b85
Use a patch update for now as this is just fixes (#1045) 2019-12-03 03:43:12 +02:00
Matthew Leibowitz 288959ed6b
Add Code Checks (#1038)
- Component governance on all builds
- Static code analysis on a separate Windows job
2019-11-27 18:47:17 +02:00
Matthew Leibowitz 71a92e3b3c
Use Docker to Build Linux & Update Versions to v1.68.2 (#1036)
* Update the NuGet versions
* Improve the DevOps build number
* Extract the variable logic from the yaml
* Use Docker to build, and update to Ubuntu 16
2019-11-27 07:49:33 +02:00
Matthew Leibowitz 664995410c
Use better PR labels for build artifacts (#1025) 2019-11-21 05:00:24 +02:00
Matthew Leibowitz d16fd524b0
Created a P/Invoke Generator (#992)
* Added the new generator
* split some of the native builds into archs
* Update the native skia
* Generate the interop layer and use it
2019-11-05 19:38:03 +02:00
Matthew Leibowitz 743658f292
Reset the counter for the master branch (#966) 2019-09-26 23:38:22 +02:00
Matthew Leibowitz 7785e463b6
Trying to get master back on track (#962)
Fixing the counter function
2019-09-26 16:52:20 +02:00
Matthew Leibowitz c10c7394a2
Some of the colorspaces created are just references (#922)
* Some of the colorspaces created are just references
  - SRGB and SRGB Linear colorspaces are static and should never be disposed
* Fix concurrent disposal and creation
  - In some cases, a new native object is created with the same memory location while the 
    managed instances is still being disposed. In this case, we cannot remove the managed
    instance from the dictionary, since it is not the current object being disposed anymore.
  - SKColorSpace has some members that should not be disposed, since they are static on the
    native side. Just, there is no docs for this, so calling dispose will crash everything.
  - Added the logic to make sure that all static objects are created before anything, so we can 
    get a handle on them and make sure they are static managed instances.
* Make sure the objects are not collected when using spans
2019-09-24 01:34:44 +02:00
Matthew Leibowitz d5aa34a787
Re-work the managed-native types (#900)
Changes:
 - Added `GCHandleProxy` to debug builds
    - this is used to track all `GCHandle` `Alloc` and `Free` calls to ensure that all allocations are freed.
    - added some unit tests to make sure this is actually enforced
    - as a result, several object are now freed correctly
 - Added `ISKReferenceCounted` and `ISKNonVirtualReferenceCounted` interfaces to represent the reference counting types used in the native library
    - this helps with automatically de-referencing objects
 - `SKAbstractManagedStream`, `SKAbstractManagedWStream` and `SKDrawable` have been re-written to use better delegates
   - instead of passing each of the delegates as parameters, they are now a struct that is passed as a single object
   - better for extensions (which there shouldn't be) and only a single static field on the type
   - removed the usage of `Marshal.GetFunctionPointerForDelegate`, which should help out with WASM (see #876)
   - the objects now only keep weak references, meaning that they can now be garbage collected
   - instead of trying to resolve the instances with a dictionary, a delegate is used and passed as "user context"
 - Moved some of the repetitive logic from the types into the base `SKObject` and `SKNativeObject`
    - some logic is automatically executed if the concrete type is `ISKReferenceCounted` or `ISKNonVirtualReferenceCounted`
    - with the more centralized logic and stricter patterns, better tests can be written to make sure all memory is freed correctly and timely
 - `SKData`, `SKFontManager` and `SKTypeface` now correctly prevent disposal of the "static" instances
 - `SKPaint` now references the `Shader`, `MaskFilter`, `ColorFilter`, `ImageFilter`, `Typeface` and `PathEffect` properties
    - this prevents accidental collection, or non-collection when the object goes out of scope
 - the `SKPath` iterators (`Iterator` and `RawIterator`) and op builder (`OpBuilder`) now correctly own and dispose their native objects
 - `SKRegion` objects are now disposed on the native side
 - `SKTypeface` construction from a `SKManagedStream` (via both `SKTypeface` and `SKFontManager`) now copy the contents of the .NET `Stream` into a native memory
    - typeface construction requires multiple seeks (previously, the stream was copied only if it was non-seekable)
    - it also requires "duplicating" the stream, which is not supported on .NET streams
       - duplicates or forks of a stream means that each of the streams need to be read concurrently from different locations
       - .NET streams can only have a single position
 - Updated the NuGets used for the tests
     - using the `Xunit.AssemblyFixture` and `Xunit.SkippableFact` NuGets instead of using the code directly
    - removed the `Xunit.Categories` NuGet as it was preventing tests from running

This PR has a big set of changes that may be breaking due to bug fixes:
 - The `SKAbstractManagedStream`, `SKAbstractManagedWStream` and `SKDrawable` no longer prevent the GC from collecting them. This means that if code no longer references them, they will be disposed. 
    - As far as I can tell, this should not be a problem for the streams as they are never kept around - they are just used for reading and writing and typically only need to live for as long as a single method, and then need to be disposed by the caller. The `SKTypeface` and `SKDocument` do keep it around for a bit, but then they also take ownership of the stream and keep a hard reference to the streams themselves. They will dispose the streams when they are disposed.
    - `SKDrawable` is never kept around and is entirely a user-controlled object. If it goes out of scope, skia doesn't have a reference anyway.
 - The `SKFontManager` and `SKTypeface` no longer use the managed streams (`SKManagedStream` or `Stream`) directly 
- they make a copy.
    - This is simply because skia streams can do things that are not possible for .NET - they can be read concurrently from different positions. If a `SKFileStream` or `SKMemoryStream` are passed, then the streams are not copied.
    - Further optimizations can be made in the case of a `MemoryStream` or `byte[]` to not actually copy but use GC pinning to get a handle to the managed data and work with pointers. But this can be done later so that this PR can be merged and tested.
2019-07-30 03:26:21 +02:00
Matthew Leibowitz e6b7934556
Add the WPF backend for Xamarin.Forms (#917)
Add a new NuGet
- add a targets file to the nuget to warn if the platform packages were not installed

Update the pipeline:
- use build artifacts everywhere
- just disable tizen for Windows
2019-07-26 15:05:54 +02:00
Matthew Leibowitz 5e8dc3e2c9
Split the desktop projects and packages (#899)
* Removed v2.3.1 and renamed Flags to BufferFlags
* Updated some API and Doc
* Add Gtk3 views
* Reworked the samples logic
 - handle the more varied project structure
 - build the generated zip to test it
 - always use the local nuget cache
* macOS is always Any CPU
* Rename SKWidget to SKDrawingArea for GTK#3
 - this allows us to have a single moniker for docs
 - it indicates that it is not quite the same as the widget in GTK#2
 - is is more specific so we can have more GTK# controls
* merge all the views (except forms) into a single moniker so it is better for browsing in the docs portal
* SK3dView is not actually obsolete :)
* Add readmes to the samples
2019-07-23 03:02:20 +02:00
Matthew Leibowitz c4a29d82bf
A few tweaks to harfbuzz (#915) 2019-07-21 21:15:59 +02:00
Matthew Leibowitz 8c9750c87e
Improve the test runners (#903)
- `dotnet build` will fail because `CodeTaskFactory` factory is not supported, so use regular MSBuild properties
 - use the new stages feature
 - .net core tests now use libraries instead of nugets
 - changed a few things in the pipeline yaml
2019-07-13 05:14:48 +02:00
Matthew Leibowitz e28cce8ab4
Upgrade the macOS bots and software (#884)
* Upgrade the macOS bots and software
* Remove the System.Memory NuGet for the mobile platforms (Android, macOS, iOS, watchOS, tvOS)
 - mono 5.18 includes this internally
 - results in https://github.com/xamarin/xamarin-macios/issues/5687
 - related to https://github.com/mono/SkiaSharp/pull/884
2019-06-26 01:11:01 +02:00
Matthew Leibowitz 74be09278b
Publicly publish all the native artifacts (#889)
`PublishPipelineArtifact` does not allow for anonymous access, so use `PublishBuildArtifacts` instead to make `native-default` public.
2019-06-26 01:09:17 +02:00
Matthew Leibowitz a9a0cad378
Use better variables and scripts (#885)
* Remove the environment variables from the yaml
* Remove the Java bits from the tizen script 
* Add the java bin to PATH
* Set the ANDROID_NDK_HOME variable
* Set the TIZEN_STUDIO_HOME variable
* Use a variable for the host vm image
2019-06-25 09:10:09 +02:00
Matthew Leibowitz e6e6128d2a
Make sure to build Debug samples in PRs (#875)
Just the macOS builds because they use Secure Files
2019-06-22 18:39:32 +02:00
Matthew Leibowitz 650f2e43f7
Update some versions and fix the sample builds (#869)
- Xamarin.Forms is now the last v3.x (v3.6)
 - Build using the latest Android (v9.0)
 - Update UWP samples so they can build again
2019-06-21 02:20:42 +02:00
Matthew Leibowitz 097bec3e68
Make sure to remove the correct packages (#859)
* Make sure to remove the correct packages
* Validate the linux packages
2019-06-13 12:38:25 +02:00
Matthew Leibowitz 05f2551f11
Add support for a custom preview label (#857) 2019-06-06 15:33:43 +02:00
Matthew Leibowitz 3968aaf97c
Few changes for release (#850)
* Add a retry option for the tests because they fail sometimes
* Removing the samples temporarily as they are failing to build
* Updating cake and the bootstrappers
2019-05-24 07:14:37 +02:00
Matthew Leibowitz 8f7357f2b7
Correct the build script 2019-05-23 17:16:43 +02:00
Matthew Leibowitz 1527bf392e
download and publish signed build artifacts 2019-05-21 22:41:06 +02:00
Matthew Leibowitz 5da3cfd412
Support building SkiaSharp without fontconfig (#821) 2019-05-18 15:52:44 -07:00
Matthew Leibowitz fcb7056000
Use the correct combination of OpenJDK and Tizen (#817) 2019-05-01 04:19:56 +04:00
Matthew Leibowitz aec9ab2c7c
Temporarily use the Linux output for Tizen on Windows 2019-03-25 20:00:17 +02:00
Matthew Leibowitz 5c0399ffcd
Sign when building a tag or master 2019-03-13 02:53:35 +02:00
Matthew Leibowitz b88a9de5f6
Remove the mdoc submodule and download from AzDO 2019-03-11 14:00:17 +02:00
Matthew Leibowitz 0adc4b8988
Switched badge and templates (#779)
* Switched badge to Azure DevOps
* Use the new signing templates
2019-02-20 23:48:56 +02:00
Matthew Leibowitz a641470fc9
Skip Signing on Public Builds (#790) 2019-02-14 23:04:20 +02:00
Matthew Leibowitz 7412ce7649
[build] Added NuGet Signing (#786)
- Adding the signing logic
 - Don't checkout on signing
 - add features support
 - Adding some user-friendly names
 - Adding a build counter tied to the branch
2019-02-11 20:21:23 +02:00
Matthew Leibowitz a6a74427b7
Refactor the pipeline to reuse most of the functionality (#785)
Refactor the pipeline to reuse most of the functionality
 - typically, just the target changes
 - added hooks for pre/post build steps for the special cases
 - rewrote the scripts using powershell only
2019-02-09 20:23:09 +02:00
Matthew Leibowitz 962f7be601
Adding iOS/macOS Certificates (#777)
Adding the iOS/macOS/tvOS certificates to the samples job
2019-02-06 00:00:48 +02:00
Xamarin Release Engineering 3b1177b891 Remove test job 2019-02-04 22:24:27 -05:00
Matthew Leibowitz d6f333a52f
Added Azure DevOps Pipeline (#776)
* Trying to get an older linux build
* Switch to clang 3.8 on linux. #686
* Statically link things for linux
* Set up CI with Azure Pipelines
* Updated the tizen install script to work on macos and linux
* Make sure to install the version of the Android NDK we support
* Added missing [SkippableFact] attribute
2019-02-05 05:22:35 +02:00