Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 24 additions & 59 deletions .github/workflows/auto-api-docs-writer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 19 additions & 29 deletions .github/workflows/auto-api-docs-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ on:
branches: [main]
paths:
- ".github/workflows/auto-api-docs-writer*"
pull_request:
paths:
- ".github/workflows/auto-api-docs-writer*"
# No pull_request trigger: the writer runs the full agentic pipeline and
# opens a PR via safe-outputs. On a PR that edits this workflow, that PR
# creation is blocked (protected workflow files), which red-flags the check.
# The push-to-main trigger above still validates workflow changes after merge.
workflow_dispatch:
inputs:
skiasharp_branch:
Expand All @@ -21,11 +22,16 @@ on:
type: string

# -- Custom jobs -------------------------------------------------------
# Stub regeneration requires Windows (mdoc.exe is .NET Framework).
# Checks out SkiaSharp (public), runs mdoc, uploads result as artifact.
# Stub regeneration runs mdoc to produce the XML reference stubs. mdoc.exe is a
# .NET Framework tool, so on Linux it runs under Mono (docs.cake invokes it via mono);
# this lets the job run on ubuntu-latest instead of windows-latest. The managed GTK#
# reference assemblies mdoc needs are supplied from NuGet by the cake comparer (as --lib
# paths), so no system GTK# install is required — mono is the only extra dependency.
# Checks out SkiaSharp (public), runs scripts/infra/docs/generate-api-docs.sh, uploads
# the result as an artifact.
jobs:
regenerate-stubs:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- name: Checkout SkiaSharp
uses: actions/checkout@v4
Expand All @@ -44,43 +50,27 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
global-json-file: global.json
- name: Setup Mono (runs mdoc.exe on Linux)
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mono-complete
- name: Cache NuGet global packages
uses: actions/cache@v4
with:
path: ${{ env.USERPROFILE }}\.nuget\packages
path: ~/.nuget/packages
key: nuget-global-${{ hashFiles('scripts/VERSIONS.txt', 'scripts/infra/shared/shared.cake') }}
restore-keys: |
nuget-global-
- name: Cache GTK# installer
id: cache-gtk
uses: actions/cache@v4
with:
path: ${{ runner.temp }}\gtk-sharp.msi
key: gtk-sharp-2.12.45
- name: Download GTK# 2
if: steps.cache-gtk.outputs.cache-hit != 'true'
shell: pwsh
run: |
$msiUrl = "https://github.com/mono/gtk-sharp/releases/download/2.12.45/gtk-sharp-2.12.45.msi"
Invoke-WebRequest -Uri $msiUrl -OutFile "$env:RUNNER_TEMP\gtk-sharp.msi"
- name: Install GTK# 2
shell: pwsh
run: |
Start-Process msiexec.exe -ArgumentList "/i", "$env:RUNNER_TEMP\gtk-sharp.msi", "/quiet", "/norestart" -Wait -NoNewWindow
- name: Restore tools
run: dotnet tool restore
- name: Cache NuGet package_cache
uses: actions/cache@v4
with:
path: externals/package_cache
key: docs-package-cache-${{ hashFiles('scripts/VERSIONS.txt', 'scripts/infra/shared/shared.cake') }}
restore-keys: |
docs-package-cache-
- name: Download latest NuGet packages
run: dotnet cake --target=docs-download-output
- name: Regenerate API docs
run: dotnet cake --target=update-docs
run: bash scripts/infra/docs/generate-api-docs.sh
- name: Extract placeholders and manifest
shell: pwsh
run: |
Expand Down