Skip to content

Add a workflow to regenerate the native libclang and libClangSharp packages#779

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:regenerate-native-workflow
Jul 15, 2026
Merged

Add a workflow to regenerate the native libclang and libClangSharp packages#779
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:regenerate-native-workflow

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Adds a CI workflow that regenerates the native runtime packages and bumps the tracked LLVM version to exercise it.


.github/workflows/regenerate-native.yml — on push to main (and via workflow_dispatch):

  • libclang.runtime.* is lifted from the matching llvmorg-<version> LLVM release.
  • libClangSharp.runtime.* is compiled against that same release.
  • The resulting nupkgs are packed and signed on a separate native signing leg (scripts/SignClientFileListNative.txt), mirroring the managed sign-nuget job. Signing runs only for push (never PRs) and only when the legs that actually ran succeeded. Publishing to NuGet stays manual.

libclang regenerates when the tracked LLVM major.minor changes; libClangSharp regenerates for that same reason or when sources/libClangSharp/ changes. A detect step fails fast if the nuspec/runtime.json versions drift from the CMakeLists.txt LLVM version.


scripts/build.ps1 / scripts/build.sh — the download-and-stage logic lives behind -regeneratenative (with -target/-rid/-llvm) so it can be run locally, rather than being inlined in YAML. Windows bsdtar handles .tar.xz extraction, so the libclang lift runs for all five runtimes on a single host.


LLVM 21.1.8 → 22.1.8 — the newest release carrying all five runtime assets we map (win-x64, win-arm64, linux-x64, linux-arm64, osx-arm64). This is the first real exercise of the workflow. The managed bindings (// Ported from llvmorg-… headers, VersionPrefix, docs) and the consuming Directory.Packages.props references are intentionally left until the packages are regenerated and published.


The regenerate-native workflow has not run on Actions before; this is its first trip. README documents the flow under "Regenerating native binaries".

…ckages

Adds .github/workflows/regenerate-native.yml which lifts libclang from the matching LLVM release and compiles libClangSharp against it, then packs and signs the runtime nupkgs on push to main. libclang regenerates when the tracked major.minor changes; libClangSharp also regenerates when sources/libClangSharp changes. A detect step fails fast if the nuspec/runtime.json versions drift from the CMakeLists.txt LLVM version.

The download-and-stage logic lives in scripts/build.ps1/build.sh behind -regeneratenative so it can run locally, and Windows bsdtar handles the .tar.xz extraction for every runtime on one host.

Bumps the tracked LLVM version to 22.1.8, the newest release carrying all five runtime assets, to exercise the workflow. The managed bindings and consuming package references are intentionally left until the packages are regenerated and published.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 7c8d4de into dotnet:main Jul 15, 2026
12 checks passed
@tannergooding
tannergooding deleted the regenerate-native-workflow branch July 15, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant