GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Build and validate the C# package without duplicated CI work · Issue #75 · Seddryck/Expressif.Syntax

Build and validate the C# package without duplicated CI work #75

New issue
Copy link
New issue
Copy link
Closed
#76
Closed
Build and validate the C# package without duplicated CI work#75
#76
Copy link
Labels
enhancementNew feature or request

Description

@Seddryck
Seddryck
opened on Aug 17, 2026
Issue body actions

Context

The current CI workflow validates the Tree-sitter corpus and the C# binding in separate jobs, then starts a new packaging job that restores and rebuilds the C# project. The release workflow separately builds native grammar libraries and creates the NuGet package.

Refactor CI so that each node owns one responsibility, native libraries and managed assemblies are built once, and the resulting NuGet package is tested as a consumer would use it.

Proposed workflow graph

flowchart TD
    S["Source checkout"] --> V["Calculate version"]
    S --> P["Validate Tree-sitter grammar"]

    P --> NW["Build win-x64 native library"]
    P --> NL["Build linux-x64 native library"]
    P --> A["Create native C source archive"]

    V --> C["Build managed assemblies and create NuGet package"]
    NW --> C
    NL --> C

    C --> TW["Consume NuGet package on Windows x64"]
    C --> TL["Consume NuGet package on Linux x64"]

    TW --> U["Collect validated artifacts"]
    TL --> U
    A --> U

    U --> G["CI gate"]
Loading

Proposed responsibilities

Calculate version

Calculate the repository version once and expose it to the packaging jobs.

Validate Tree-sitter grammar

Run the corpus tests as the grammar-level validation. This job owns grammar correctness and does not build distributable packages.

Build native libraries

Build each supported native grammar library once on its target platform:

win-x64/tree-sitter-expressif.dll
linux-x64/libtree-sitter-expressif.so

Upload each native library as an artifact. Downstream jobs must consume these artifacts rather than compile the same native library again.

Build the C# package

Download the native artifacts, build the managed assemblies for every declared target framework, and create one NuGet package containing:

lib/net8.0/Expressif.Syntax.dll
lib/net9.0/Expressif.Syntax.dll
lib/net10.0/Expressif.Syntax.dll
runtimes/win-x64/native/tree-sitter-expressif.dll
runtimes/linux-x64/native/libtree-sitter-expressif.so

Avoid recursively invoking dotnet for every .csproj. Restore and build the required project graph once, then create the NuGet package with --no-build.

Do not invoke Tree-sitter CLI from the managed build when precompiled native assets have been supplied.

Validate the packaged C# binding

Download the generated .nupkg in clean Windows x64 and Linux x64 jobs.

Each job must:

  1. Configure a temporary local package source containing the generated package.
  2. Restore a consumer test project from that package source.
  3. Reference the package rather than the repository's C# source project.
  4. Run the binding test suite for every declared target framework.
  5. Load the platform-selected native grammar library through TreeSitter.DotNet.
  6. Parse representative Expressif expressions and assert their syntax trees.

This validates the package layout, NuGet runtime asset selection, native loading, and managed API on every advertised runtime.

Every runtime identifier included in the NuGet package must have a corresponding package-consumption test. Add another operating system or architecture only when CI can both build and execute the packaged binding there.

Create the native C archive

Create the portable parser source archive once and upload it as an artifact. This job does not compile the C# binding or recreate the NuGet package.

Collect validated artifacts

Download the already-created NuGet package and native C archive and publish the combined workflow artifact. This job performs no compilation or packaging.

CI gate

Expose one stable branch-protection status that succeeds only when grammar validation, native builds, package creation, package-consumption tests, and artifact collection all succeed.

Acceptance criteria

  • Tree-sitter corpus validation remains independent and passes.
  • The win-x64 and linux-x64 native grammar libraries are each compiled once.
  • Managed assemblies are built once for net8.0, net9.0, and net10.0.
  • The NuGet package contains the precompiled native assets under the correct runtime paths.
  • Clean Windows x64 and Linux x64 consumers restore and test the generated NuGet package.
  • Package-consumption tests run for every target framework declared by the consumer test project.
  • Tests exercise native loading and parsing rather than only checking that restore succeeds.
  • The artifact-collection job does not rebuild or repackage any component.
  • CI and release workflows use the same validated NuGet-building path.
  • The final CI gate fails when any required validation or package-consumption job fails.

Activity

  1. Seddryck
    added
    enhancementNew feature or request
    on Aug 17, 2026
  2. Seddryck
    changed the title [-]Separate CI validation by distributable ecosystem[/-] [+]Build and validate the C# package without duplicated CI work[/+] on Aug 17, 2026
  3. Seddryck
    closed this as completedin #76on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.