Skip to content

Instantly share code, notes, and snippets.

@mattleibow
Last active May 6, 2026 19:04
Show Gist options
  • Select an option

  • Save mattleibow/0c45fd85c6c1c6c906b1366e2a5a4a0c to your computer and use it in GitHub Desktop.

Select an option

Save mattleibow/0c45fd85c6c1c6c906b1366e2a5a4a0c to your computer and use it in GitHub Desktop.
SkiaSharp Build Dependency Graph

SkiaSharp Pipeline Stage Flow

Actual ADO Pipeline Execution

graph TD
    P[prepare] --> NM[native_macos<br>10 jobs]
    P --> NW[native_windows<br>19 jobs]
    P --> NL[native_linux<br>25 jobs]
    P --> NWASM[native_wasm<br>16 jobs]
    
    NM --> MERGE[native merge<br>combines artifacts]
    NW --> MERGE
    NL --> MERGE
    NWASM --> MERGE

    MERGE -->|"native artifacts"| LIBS[managed/libs<br>3 jobs: Win/Mac/Linux]
    MERGE -->|"native artifacts"| PKG[package<br>nuget-normal + nuget-special]
    MERGE -->|"native artifacts"| TESTS[tests<br>netfx, netcore, android, ios, maccatalyst, wasm]

    PKG -->|"nuget artifacts"| AD[api_diff]
    PKG -->|"nuget artifacts"| SAMPLES[samples<br>3 jobs: Win/Mac/Linux]

    style P fill:#ddd
    style NM fill:#fda
    style NW fill:#fda
    style NL fill:#fda
    style NWASM fill:#fda
    style MERGE fill:#fed
    style LIBS fill:#adf
    style PKG fill:#adf
    style TESTS fill:#adf
    style AD fill:#dfa
    style SAMPLES fill:#dfa
Loading

Artifact Flow

Stage Downloads Produces
native_* native binaries (.so/.dll/.a/.framework)
native merge native_* outputs combined native artifact
managed/libs native artifact managed assemblies
package native artifact nuget + nuget-symbols artifacts
tests native artifact test results
api_diff nuget + changelogs artifacts API diff reports
samples nuget artifact sample builds

Proposed Cache Config (with dependsOn)

graph TD
    G["Global<br>VERSIONS.txt, shared/**, nuget.config, global.json"]
    
    N["native<br>scripts/infra/native/shared/**<br>submodules: skia, depot_tools"]
    N_android["native/android"]
    N_ios["native/ios"]
    N_windows["native/windows"]
    N_linux["native/linux"]
    N_wasm["native/wasm"]
    N_etc["...other platforms"]
    
    M["managed<br>binding/**, source/**, build.cake, etc.<br>dependsOn: native ← accumulates submodules"]
    M_libs["managed/libs<br>(no extra files)"]
    M_package["managed/package<br>scripts/infra/package/**"]
    M_tests["managed/tests<br>tests/**, scripts/infra/tests/**"]
    M_api_diff["managed/package/api_diff<br>scripts/infra/docs/**, changelogs/**"]
    M_samples["managed/package/samples<br>samples/**, scripts/infra/samples/**"]

    G --> N
    G --> M
    N --> N_android
    N --> N_ios
    N --> N_windows
    N --> N_linux
    N --> N_wasm
    N --> N_etc
    M -.->|"dependsOn"| N
    M --> M_libs
    M --> M_package
    M --> M_tests
    M_package --> M_api_diff
    M_package --> M_samples

    style G fill:#f9f
    style N fill:#fda
    style M fill:#adf
    style M_package fill:#aef
    style M_tests fill:#aef
    style M_libs fill:#aef
    style M_api_diff fill:#dfa
    style M_samples fill:#dfa
Loading

The dependsOn: native means managed's cache key automatically includes native's submodule SHAs. If Skia changes → native rebuilds AND managed/package/tests/samples all invalidate too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment