Skip to content

Commit

Permalink
Make include file contents inline (#415)
Browse files Browse the repository at this point in the history
* Make include file contents inline.

* Ignore only markdown file changes PR

* Update build-pr.yml

* Revert "Update build-pr.yml"

This reverts commit 2fd9102.

* Update build-pr.yml

* Update build-pr.yml

* Exclude deleted files from the build

* Update build-pr.yml

---------

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
  • Loading branch information
davidbritch and jfversluis committed Jan 10, 2024
1 parent 8c9920c commit 02a9d58
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 43 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Build Changed C# Projects for PR

on:
pull_request:
paths-ignore:
- '**.md'

jobs:
build:
Expand Down Expand Up @@ -36,7 +38,7 @@ jobs:
run: |
$failedProjectCount=0
# Get the list of changed files
$changedFiles = git diff --name-only -r HEAD^1 HEAD
$changedFiles = git diff --name-only -r --diff-filter=d HEAD^1 HEAD
$excluded_projects_file="./eng/excluded_projects_" + "${{ runner.os }}".ToLower() + ".txt"
$excluded_projects=@()
Expand Down
37 changes: 36 additions & 1 deletion 8.0/SkiaSharp/MandelbrotAnimation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,39 @@ When you first run the program, the `Label` at the top of the program shows whic
> [!NOTE]
> On some devices, the animation runs smoother if the sample is not being run under control of Visual Studio's debugger.
[!INCLUDE [Install SkiaSharp](../includes/install-skiasharp.md)]
## Use SkiaSharp in an app

To use SkiaSharp in your .NET MAUI app you should:

1. Add the `SkiaSharp.Views.Maui.Controls` NuGet package to your app. This will also install dependent SkiaSharp packages.
1. Initialize SkiaSharp in your app by calling the `UseSkiaSharp` method on the `MauiAppBuilder` object in your `MauiProgram` class:


```csharp
using Microsoft.Extensions.Logging;
using SkiaSharp.Views.Maui.Controls.Hosting;

namespace MyMauiApp;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSkiaSharp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
```
37 changes: 36 additions & 1 deletion 8.0/SkiaSharp/PhotoPuzzle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,39 @@ This sample demonstrates the use of SkiaSharp in a .NET Multi-platform App UI (.

After pressing the **Randomize** button, just tap a tile to move it into an empty position. You can *tap* any tile in the row or column of the empty position to move one, two, or three tiles at once. Use the numbers in the lower-right corner of each tile as a guide.

[!INCLUDE [Install SkiaSharp](../includes/install-skiasharp.md)]
## Use SkiaSharp in an app

To use SkiaSharp in your .NET MAUI app you should:

1. Add the `SkiaSharp.Views.Maui.Controls` NuGet package to your app. This will also install dependent SkiaSharp packages.
1. Initialize SkiaSharp in your app by calling the `UseSkiaSharp` method on the `MauiAppBuilder` object in your `MauiProgram` class:


```csharp
using Microsoft.Extensions.Logging;
using SkiaSharp.Views.Maui.Controls.Hosting;

namespace MyMauiApp;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSkiaSharp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
```
37 changes: 36 additions & 1 deletion 8.0/SkiaSharp/SkiaSharpDemos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,39 @@ SkiaSharp is a 2D graphics system for .NET and C# powered by the open-source Ski

This sample demonstrates the use of SkiaSharp in a .NET MAUI app.

[!INCLUDE [Install SkiaSharp](../includes/install-skiasharp.md)]
## Use SkiaSharp in an app

To use SkiaSharp in your .NET MAUI app you should:

1. Add the `SkiaSharp.Views.Maui.Controls` NuGet package to your app. This will also install dependent SkiaSharp packages.
1. Initialize SkiaSharp in your app by calling the `UseSkiaSharp` method on the `MauiAppBuilder` object in your `MauiProgram` class:


```csharp
using Microsoft.Extensions.Logging;
using SkiaSharp.Views.Maui.Controls.Hosting;

namespace MyMauiApp;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSkiaSharp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
```
37 changes: 36 additions & 1 deletion 8.0/SkiaSharp/SpinPaint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,39 @@ SpinPaint demonstrates the use of SkiaSharp in a .NET Multi-platform App UI (.NE

![SpinPaint app screenshot](Screenshots/SpinPaint.png "SpinPaint app screenshot")

[!INCLUDE [Install SkiaSharp](../includes/install-skiasharp.md)]
## Use SkiaSharp in an app

To use SkiaSharp in your .NET MAUI app you should:

1. Add the `SkiaSharp.Views.Maui.Controls` NuGet package to your app. This will also install dependent SkiaSharp packages.
1. Initialize SkiaSharp in your app by calling the `UseSkiaSharp` method on the `MauiAppBuilder` object in your `MauiProgram` class:


```csharp
using Microsoft.Extensions.Logging;
using SkiaSharp.Views.Maui.Controls.Hosting;

namespace MyMauiApp;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSkiaSharp()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

#if DEBUG
builder.Logging.AddDebug();
#endif

return builder.Build();
}
}
```
38 changes: 0 additions & 38 deletions 8.0/SkiaSharp/includes/install-skiasharp.md

This file was deleted.

0 comments on commit 02a9d58

Please sign in to comment.