-
Notifications
You must be signed in to change notification settings - Fork 371
feat(kit): C++ desktop find_package prefix for RCLI #776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d5fa587
feat(kit): publish a C++ desktop find_package prefix for RCLI
sanchitmonga22 3db4c20
fix(ci): do not use setup-toolchain on the macOS C++ kit job
sanchitmonga22 90597da
fix(windows): target AMD64 when building the x64 desktop kit on WoA
sanchitmonga22 0899a75
ci: reject C++ desktop kit tarballs that omit proto headers
sanchitmonga22 724b21c
fix(kit): use CMake WHOLE_ARCHIVE genex on MSVC
sanchitmonga22 09e18f8
fix(kit): address CodeRabbit review of the C++ desktop kit
sanchitmonga22 ab0d67c
chore: drop in-tree rcli; public SDKs ship the C++ kit only
sanchitmonga22 f0f0ebb
docs: drop retired native_rcli_macos from the generated-code contract
sanchitmonga22 d473269
fix: address remaining CodeRabbit leftovers after the rcli split
sanchitmonga22 d1c640e
fix(kit): stage zlibstatic and bz2_bundled from their MSVC output dirs
sanchitmonga22 382da7b
fix(kit): stage onnxruntime.lib and never link the ORT DLL on Windows
sanchitmonga22 af1bc8f
fix(kit): always bundle zlibstatic when packaging the C++ desktop kit
sanchitmonga22 0046a76
fix(kit): export iphlpapi, xmllite, and ole32 on Windows kits
sanchitmonga22 d358ef6
ci: treat C++ desktop kits as first-class release assets
sanchitmonga22 34a8cb1
feat(kit): ship NeuRT and QHexRT as private desktop overlays
sanchitmonga22 e7d13e2
fix(kit): keep NeuRT out of public kits and make QHexRT overlay downl…
sanchitmonga22 1a5e7b7
fix(kit): copy QAIRT DLLs off the Windows current junction
sanchitmonga22 26db878
chore: release 0.20.28
sanchitmonga22 3ab7945
fix(kit): ship routable sherpa and sync v0.20.28 Apple checksums
sanchitmonga22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,278 @@ | ||
| name: C++ desktop kit | ||
|
|
||
| # Builds the find_package(RunAnywhere) prefix RCLI consumes. Does not build rcli. | ||
| # Dispatch this to refresh kits without a full SDK release train. release.yml | ||
| # also builds the same presets and attaches the tarballs to the GitHub Release. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| attach_tag: | ||
| description: 'GitHub release tag to attach kits to (e.g. v0.20.25). Empty = artifacts only.' | ||
| required: false | ||
| default: '' | ||
| push: | ||
| paths: | ||
| - 'cmake/CppDesktopKit.cmake' | ||
| - 'cmake/PackageCppDesktop.cmake' | ||
| - 'cmake/RunAnywhereConfig.cmake.in' | ||
| - 'CMakePresets.json' | ||
| - 'core/**' | ||
| - 'engines/**' | ||
| - 'idl/**' | ||
| - 'scripts/build/package-private-engine-overlay.sh' | ||
| - 'scripts/build/fetch-private-engine-pack.sh' | ||
| - 'scripts/ci/verify_cpp_desktop_kit.py' | ||
| - '.github/workflows/cpp-desktop-kit.yml' | ||
| branches: [main] | ||
| pull_request: | ||
| paths: | ||
| - 'cmake/CppDesktopKit.cmake' | ||
| - 'cmake/PackageCppDesktop.cmake' | ||
| - 'cmake/RunAnywhereConfig.cmake.in' | ||
| - 'CMakePresets.json' | ||
| - 'core/**' | ||
| - 'engines/**' | ||
| - 'idl/**' | ||
| - 'scripts/build/package-private-engine-overlay.sh' | ||
| - 'scripts/build/fetch-private-engine-pack.sh' | ||
| - 'scripts/ci/verify_cpp_desktop_kit.py' | ||
| - '.github/workflows/cpp-desktop-kit.yml' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: cpp-desktop-kit-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| macos-arm64: | ||
| runs-on: macos-14 | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install ninja | ||
| run: brew install ninja | ||
| - name: Sherpa-ONNX prebuilts (required for a ROUTABLE sherpa backend) | ||
| run: bash core/scripts/macos/download-sherpa-onnx.sh | ||
| - name: Configure + package | ||
| run: | | ||
| set -euo pipefail | ||
| cmake --preset cpp-desktop-macos-arm64 | ||
| cmake --build --preset cpp-desktop-macos-arm64 --target package-cpp-desktop-tarball \ | ||
| -j "$(sysctl -n hw.logicalcpu)" | ||
| ls -la dist/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz | ||
| tar=$(echo dist/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz) | ||
| python3 scripts/ci/verify_cpp_desktop_kit.py "$tar" --source-root . --forbid-private-engines | ||
| shasum -a 256 dist/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz \ | ||
| | tee "dist/RunAnywhere-cpp-desktop-macos-arm64-v$(tr -d '[:space:]' < core/VERSION).tar.gz.sha256" | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cpp-desktop-macos-arm64 | ||
| path: | | ||
| dist/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz | ||
| dist/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz.sha256 | ||
| if-no-files-found: error | ||
|
|
||
| windows-x64: | ||
| runs-on: windows-2022 | ||
| timeout-minutes: 120 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/setup-toolchain | ||
| with: | ||
| platform: windows | ||
| - uses: ilammy/msvc-dev-cmd@v1 | ||
| - name: vcpkg curl (static) | ||
| shell: pwsh | ||
| run: | | ||
| & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install curl:x64-windows-static zlib:x64-windows-static | ||
| if ($LASTEXITCODE -ne 0) { throw "vcpkg install failed" } | ||
| - name: Sherpa-ONNX prebuilts (required for a ROUTABLE sherpa backend) | ||
| shell: cmd | ||
| run: core\scripts\windows\download-sherpa-onnx.bat | ||
| - name: Configure + package | ||
| shell: pwsh | ||
| run: | | ||
| cmake --preset cpp-desktop-windows-x64 | ||
| if ($LASTEXITCODE -ne 0) { throw "cmake configure failed" } | ||
| cmake --build --preset cpp-desktop-windows-x64 --config Release --target package-cpp-desktop-tarball | ||
| if ($LASTEXITCODE -ne 0) { throw "cmake build failed" } | ||
| $ver = (Get-Content core/VERSION -Raw).Trim() | ||
| $tar = "dist/RunAnywhere-cpp-desktop-windows-x64-v$ver.tar.gz" | ||
| if (-not (Test-Path $tar)) { throw "missing $tar" } | ||
| python scripts/ci/verify_cpp_desktop_kit.py $tar --source-root . --windows --forbid-private-engines | ||
| if ($LASTEXITCODE -ne 0) { throw "kit tarball contents check failed" } | ||
| Get-FileHash $tar -Algorithm SHA256 | | ||
| ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | | ||
| Set-Content "$tar.sha256" | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cpp-desktop-windows-x64 | ||
| path: | | ||
| dist/RunAnywhere-cpp-desktop-windows-x64-v*.tar.gz | ||
| dist/RunAnywhere-cpp-desktop-windows-x64-v*.tar.gz.sha256 | ||
| if-no-files-found: error | ||
|
|
||
| windows-arm64: | ||
| runs-on: windows-11-arm | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/setup-toolchain | ||
| with: | ||
| platform: windows | ||
| - uses: ilammy/msvc-dev-cmd@v1 | ||
| with: | ||
| arch: arm64 | ||
| - name: vcpkg curl (static arm64) | ||
| shell: pwsh | ||
| run: | | ||
| & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install curl:arm64-windows-static zlib:arm64-windows-static | ||
| if ($LASTEXITCODE -ne 0) { throw "vcpkg install failed" } | ||
| - name: Configure + package (OSS, no QHexRT) | ||
| shell: pwsh | ||
| run: | | ||
| cmake --preset cpp-desktop-windows-arm64 | ||
| if ($LASTEXITCODE -ne 0) { throw "cmake configure failed" } | ||
| cmake --build --preset cpp-desktop-windows-arm64 --config Release --target package-cpp-desktop-tarball | ||
| if ($LASTEXITCODE -ne 0) { throw "cmake build failed" } | ||
| $ver = (Get-Content core/VERSION -Raw).Trim() | ||
| $tar = "dist/RunAnywhere-cpp-desktop-windows-arm64-v$ver.tar.gz" | ||
| if (-not (Test-Path $tar)) { throw "missing $tar" } | ||
| $actual = Get-Item $tar | ||
| $wantName = Split-Path $tar -Leaf | ||
| if ($actual.Name -cne $wantName) { | ||
| $tmp = Join-Path $actual.DirectoryName ("tmp-" + [guid]::NewGuid().ToString("n") + ".tar.gz") | ||
| Rename-Item -LiteralPath $actual.FullName -NewName (Split-Path $tmp -Leaf) | ||
| Rename-Item -LiteralPath $tmp -NewName $wantName | ||
| } | ||
| python scripts/ci/verify_cpp_desktop_kit.py $tar --source-root . --windows --allow-missing-onnxruntime --forbid-private-engines | ||
| if ($LASTEXITCODE -ne 0) { throw "kit tarball contents check failed" } | ||
| Get-FileHash $tar -Algorithm SHA256 | | ||
| ForEach-Object { "$($_.Hash.ToLower()) $(Split-Path $_.Path -Leaf)" } | | ||
| Set-Content "$tar.sha256" | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cpp-desktop-windows-arm64 | ||
| path: | | ||
| dist/RunAnywhere-cpp-desktop-windows-arm64-v*.tar.gz | ||
| dist/RunAnywhere-cpp-desktop-windows-arm64-v*.tar.gz.sha256 | ||
| if-no-files-found: error | ||
|
|
||
| macos-arm64-neurt-private: | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: macos-14 | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install ninja | ||
| run: brew install ninja | ||
| - name: Fetch NeuRT prebuilt | ||
| env: | ||
| NEURUN_TOKEN: ${{ secrets.NEURUN_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ -z "${NEURUN_TOKEN:-}" ]]; then | ||
| echo "::error::NEURUN_TOKEN is required for the NeuRT overlay (no stubs)." | ||
| exit 1 | ||
| fi | ||
| bash scripts/build/download-neurt.sh --slice macos-arm64 | ||
| - name: Build rac_backend_neurt + package overlay | ||
| env: | ||
| NEURUN_TOKEN: ${{ secrets.NEURUN_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| cmake --preset cpp-desktop-macos-arm64-neurt | ||
| cmake --build --preset cpp-desktop-macos-arm64-neurt --target rac_backend_neurt \ | ||
| -j "$(sysctl -n hw.logicalcpu)" | ||
| bash scripts/build/package-private-engine-overlay.sh \ | ||
| --engine neurt \ | ||
| --build-dir build/cpp-desktop-macos-arm64-neurt | ||
| tar=$(echo dist/RunAnywhere-cpp-desktop-macos-arm64-neurt-private-v*.tar.gz) | ||
| python3 scripts/ci/verify_cpp_desktop_kit.py "$tar" --source-root . --require-overlay neurt | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cpp-desktop-macos-arm64-neurt-private | ||
| path: | | ||
| dist/RunAnywhere-cpp-desktop-macos-arm64-neurt-private-v*.tar.gz | ||
| dist/RunAnywhere-cpp-desktop-macos-arm64-neurt-private-v*.tar.gz.sha256 | ||
| if-no-files-found: error | ||
|
|
||
| windows-arm64-qhexrt-private: | ||
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | ||
| runs-on: windows-11-arm | ||
| timeout-minutes: 120 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/setup-toolchain | ||
| with: | ||
| platform: windows | ||
| - uses: ilammy/msvc-dev-cmd@v1 | ||
| with: | ||
| arch: arm64 | ||
| - name: vcpkg curl (static arm64) | ||
| shell: pwsh | ||
| run: | | ||
| & "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install curl:arm64-windows-static zlib:arm64-windows-static | ||
| if ($LASTEXITCODE -ne 0) { throw "vcpkg install failed" } | ||
| - name: Fetch QHexRT + QAIRT | ||
| env: | ||
| NEURUN_TOKEN: ${{ secrets.NEURUN_TOKEN }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ -z "${NEURUN_TOKEN:-}" ]]; then | ||
| echo "::error::NEURUN_TOKEN is required for the QHexRT overlay (no stubs)." | ||
| exit 1 | ||
| fi | ||
| bash scripts/build/download-qhexrt.sh --abi win-arm64 | ||
| bash scripts/build/download-qairt-runtime.sh --platform win-arm64 | ||
| - name: Build rac_backend_qhexrt + package overlay | ||
| env: | ||
| NEURUN_TOKEN: ${{ secrets.NEURUN_TOKEN }} | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| cmake --preset cpp-desktop-windows-arm64-qhexrt | ||
| cmake --build --preset cpp-desktop-windows-arm64-qhexrt --config Release --target rac_backend_qhexrt | ||
| bash scripts/build/package-private-engine-overlay.sh \ | ||
| --engine qhexrt \ | ||
| --build-dir build/cpp-desktop-windows-arm64-qhexrt | ||
| tar=$(echo dist/RunAnywhere-cpp-desktop-windows-arm64-qhexrt-private-v*.tar.gz) | ||
| python scripts/ci/verify_cpp_desktop_kit.py "$tar" --source-root . --require-overlay qhexrt | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cpp-desktop-windows-arm64-qhexrt-private | ||
| path: | | ||
| dist/RunAnywhere-cpp-desktop-windows-arm64-qhexrt-private-v*.tar.gz | ||
| dist/RunAnywhere-cpp-desktop-windows-arm64-qhexrt-private-v*.tar.gz.sha256 | ||
| if-no-files-found: error | ||
|
|
||
| attach-release: | ||
| if: github.event_name == 'workflow_dispatch' && inputs.attach_tag != '' | ||
| needs: [macos-arm64, windows-x64, windows-arm64] | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| path: artifacts | ||
| merge-multiple: true | ||
| - name: Upload kits to ${{ inputs.attach_tag }} | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| ATTACH_TAG: ${{ inputs.attach_tag }} | ||
| run: | | ||
| set -euo pipefail | ||
| ls -la artifacts | ||
| # Attach-only: never create a release. Fail if the tag has no GitHub Release yet. | ||
| gh release view "$ATTACH_TAG" --repo "${{ github.repository }}" >/dev/null | ||
| # Public kits only. Never attach *neurt-private* / *qhexrt-private*. | ||
| gh release upload "$ATTACH_TAG" \ | ||
| artifacts/RunAnywhere-cpp-desktop-macos-arm64-v*.tar.gz* \ | ||
| artifacts/RunAnywhere-cpp-desktop-windows-x64-v*.tar.gz* \ | ||
| artifacts/RunAnywhere-cpp-desktop-windows-arm64-v*.tar.gz* \ | ||
| --repo "${{ github.repository }}" --clobber | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.