Skip to content

THRIFT-6002: Add netstd codegen test script and GitHub Actions CI matrix job#3481

Merged
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6002
May 15, 2026
Merged

THRIFT-6002: Add netstd codegen test script and GitHub Actions CI matrix job#3481
Jens-G merged 1 commit into
apache:masterfrom
Jens-G:THRIFT-6002

Conversation

@Jens-G
Copy link
Copy Markdown
Member

@Jens-G Jens-G commented May 14, 2026

Summary

  • Adds lib/netstd/Tests/codegen/run-NetStd-Codegen-Tests.ps1: a PowerShell script that tests the netstd code generator by compiling every .thrift file in the repository against the Thrift library for each target .NET version
  • Extends the script with optional parameters -TargetVersions, -TargetFolder, -ExtraThriftFiles (backward-compatible; default behaviour unchanged when called without arguments)
  • Adds lib-netstd-codegen job to .github/workflows/build.yml as a matrix over .NET 8, 9, 10 — uses the pre-built thrift-compiler artifact and actions/setup-dotnet

How the test works

For each .thrift file:

  1. Run thrift --gen netstd:<version> to produce C# code
  2. Generate a minimal solution (.slnx) and .csproj referencing lib/netstd/Thrift/Thrift.csproj
  3. Run dotnet build — any compile error is a codegen regression
  4. Execute the compiled binary — any crash is a serious code quality issue

Known-failure lists in the script handle files that are intentionally expected to fail.

Test plan

  • CI passes for all three matrix jobs (net8, net9, net10)
  • Job names show as lib-netstd-codegen (8), lib-netstd-codegen (9), lib-netstd-codegen (10) in Actions UI
  • No existing jobs in build.yml are affected
  • Script called without arguments locally defaults to system temp dir and all three .NET versions

Notes

  • actions/setup-dotnet pinned to SHA 67a3573c9a986a3f9c594539f4ab511d57bb3ce9 (v4.3.1)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

@Jens-G Jens-G requested review from fishy and jimexist as code owners May 14, 2026 21:50
@mergeable mergeable Bot added c# Pull requests that update C# code github_actions Pull requests that update GitHub Actions code labels May 14, 2026
@Jens-G Jens-G self-assigned this May 14, 2026
…rix job

Client: netstd

Tests the netstd code generator by compiling every .thrift file in the
repository against the Thrift library for .NET 8, 9, and 10 via a
matrix CI job. The PowerShell script supports optional parameters for
target versions, output folder, and extra IDL search path, keeping
local dev behaviour unchanged when called without arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jens-G Jens-G merged commit 1f74e5a into apache:master May 15, 2026
98 of 99 checks passed
@Jens-G Jens-G deleted the THRIFT-6002 branch May 15, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c# Pull requests that update C# code github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant