Skip to content

Commit ca95f55

Browse files
committed
chore(release): source signed HTP bundle from qcom-ai-hub/geniex LFS
Replace the anonymous S3 GET in overlay-htp with a sparse LFS checkout of qcom-ai-hub/geniex, so China eng can commit signed bundles via ordinary PR instead of pushing to S3 through the geo-barrier. Requires secret QCOM_AI_HUB_GENIEX_READ_TOKEN. Update notes/release.md and the self-signed release-notes fragment in .github/scripts/release.js to reference the LFS path. Refs qcom-ai-hub/geniex#1309, qcom-ai-hub/geniex#1297. Signed-off-by: Mengsheng Wu <mengshen@qti.qualcomm.com>
1 parent 4107707 commit ca95f55

3 files changed

Lines changed: 28 additions & 14 deletions

File tree

.github/scripts/release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = async ({ github, context, core }) => {
3434
const htpNote =
3535
HTP_SIGNED === "true"
3636
? `## Hexagon HTP\n\nMicrosoft-signed HTP catalog (llama.cpp @ \`${LLAMA_SHA}\`). No cert import required on Windows on Snapdragon.`
37-
: `## Hexagon HTP\n\nSelf-signed HTP catalog (llama.cpp @ \`${LLAMA_SHA}\`). End users must enable test signing and import \`ggml-htp-v1.cer\` per [notes/run.md](../blob/${VERSION}/notes/run.md).\n\nOperators: ship \`libggml-htp-to-sign-${LLAMA_SHA}.zip\` to the signing pipeline, then upload the signed result as \`libggml-htp-${LLAMA_SHA}.zip\` to \`s3://qaihub-public-assets/llama-cpp/\` and re-run this release.`;
37+
: `## Hexagon HTP\n\nSelf-signed HTP catalog (llama.cpp @ \`${LLAMA_SHA}\`). End users must enable test signing and import \`ggml-htp-v1.cer\` per [notes/run.md](../blob/${VERSION}/notes/run.md).\n\nOperators: ship \`libggml-htp-to-sign-${LLAMA_SHA}.zip\` to the signing pipeline, then commit the signed result as \`sdk/signed-htp/libggml-htp-${LLAMA_SHA}.zip\` to \`qcom-ai-hub/geniex\` via PR (LFS-tracked) and re-run this release.`;
3838

3939
let release;
4040
for await (const res of github.paginate.iterator(
@@ -46,7 +46,7 @@ module.exports = async ({ github, context, core }) => {
4646
}
4747

4848
// Merge htpNote into the release body, replacing any stale HTP section from a
49-
// prior run (e.g. self-signed → Microsoft-signed once the S3 bundle lands).
49+
// prior run (e.g. self-signed → Microsoft-signed once the signed bundle lands).
5050
const mergeHtpNote = (body) => {
5151
const base = (body || "").replace(/## Hexagon HTP[\s\S]*$/m, "").trimEnd();
5252
return base ? `${base}\n\n${htpNote}` : htpNote;

.github/workflows/release.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ jobs:
101101
version_tag: ${{ needs.resolve-tag.outputs.tag }}
102102
upload_artifact: true
103103

104-
# Overlay the Microsoft-signed HTP bundle from S3 if available; otherwise
105-
# the Windows SDK stays self-signed and gets marked as such downstream.
104+
# Overlay the Microsoft-signed HTP bundle from qcom-ai-hub/geniex LFS if
105+
# available; otherwise the Windows SDK stays self-signed and gets marked
106+
# as such downstream.
106107
overlay-htp:
107108
name: overlay-htp (windows-arm64)
108109
runs-on: ubuntu-latest
@@ -120,24 +121,35 @@ jobs:
120121
- name: Init llama.cpp submodule
121122
run: git submodule update --init --depth=1 third-party/llama.cpp
122123

124+
- name: Fetch signed HTP archive from qcom-ai-hub/geniex
125+
uses: actions/checkout@v7
126+
with:
127+
repository: qcom-ai-hub/geniex
128+
ref: main
129+
lfs: true
130+
path: signed-htp-src
131+
sparse-checkout: sdk/signed-htp
132+
sparse-checkout-cone-mode: false
133+
token: ${{ secrets.QCOM_AI_HUB_GENIEX_READ_TOKEN }}
134+
fetch-depth: 1
135+
123136
- uses: actions/download-artifact@v8
124137
with:
125138
name: sdk-windows-arm64
126139
path: sdk-windows-arm64
127140

128-
- name: Overlay Microsoft-signed HTP bundle from S3 (if available)
141+
- name: Overlay Microsoft-signed HTP bundle from LFS (if available)
129142
id: htp
130143
run: |
131144
set -euo pipefail
132145
sha=$(git -C third-party/llama.cpp rev-parse --short=6 HEAD)
133-
url="https://qaihub-public-assets.s3.us-west-2.amazonaws.com/llama-cpp/libggml-htp-${sha}.zip"
134-
if curl -fsSL -o htp-signed.zip "$url"; then
135-
unzip -o htp-signed.zip -d sdk-windows-arm64/lib/llama_cpp/
146+
src="signed-htp-src/sdk/signed-htp/libggml-htp-${sha}.zip"
147+
if [[ -f "$src" ]]; then
148+
unzip -o "$src" -d sdk-windows-arm64/lib/llama_cpp/
136149
signed=true
137150
else
138151
signed=false
139152
fi
140-
rm -f htp-signed.zip
141153
echo "Signed HTP bundle for llama.cpp @ ${sha}: ${signed}"
142154
echo "signed=${signed}" >> "$GITHUB_OUTPUT"
143155
echo "llama_sha=${sha}" >> "$GITHUB_OUTPUT"

notes/release.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,22 +165,24 @@ The per-tag manifest is byte-stable across workflow re-runs of the same tag —
165165

166166
## Hexagon HTP signing
167167

168-
The Windows ARM64 SDK ships `libggml-htp.cat` plus `libggml-htp-v{68,69,73,75,79,81}.so` — Windows refuses to load them unsigned. Release CI runs an `overlay-htp` job **before** `build-cli` that `curl`s `s3://qaihub-public-assets/llama-cpp/libggml-htp-<sha>.zip`, where `<sha>` is the `third-party/llama.cpp` short SHA. Both the installer and the SDK zip end up with the same HTP files:
168+
The Windows ARM64 SDK ships `libggml-htp.cat` plus `libggml-htp-v{68,69,73,75,79,81}.so` — Windows refuses to load them unsigned. Release CI runs an `overlay-htp` job **before** `build-cli` that sparse-checks-out `sdk/signed-htp/libggml-htp-<sha>.zip` from `qcom-ai-hub/geniex` (LFS-tracked), where `<sha>` is the `third-party/llama.cpp` short SHA. Both the installer and the SDK zip end up with the same HTP files:
169169

170170
- **Hit** — overlay the Microsoft-signed files into the SDK artifact; `build-cli` packages them into the installer; release normally.
171171
- **Miss** — keep the self-signed build. The SDK name gets a `-selfsigned` suffix, and the release also carries `ggml-htp-v1.cer` (users import it) and `libggml-htp-to-sign-<sha>.zip` (operators submit it for signing).
172172

173-
The S3 bundle must contain exactly these eight files at the zip root: `libggml-htp.cat`, `libggml-htp.inf`, and `libggml-htp-v{68,69,73,75,79,81}.so`.
173+
The signed bundle must contain exactly these eight files at the zip root: `libggml-htp.cat`, `libggml-htp.inf`, and `libggml-htp-v{68,69,73,75,79,81}.so`.
174+
175+
The cross-repo checkout uses `secrets.QCOM_AI_HUB_GENIEX_READ_TOKEN` — a GitHub App / fine-grained PAT scoped to `qcom-ai-hub/geniex` with `contents: read` + `metadata: read`. If CI reports `signed=false` but the bundle is merged on `main`, first check that this secret has not expired.
174176

175177
### Promoting self-signed → Microsoft-signed
176178

177179
1. Download `libggml-htp-to-sign-<sha>.zip` from the draft release.
178180
2. Submit for Microsoft signing.
179181
a. Put the `.cat` `.inf` and all `.so` files into `ATT\libggml-htp\` in samba;
180182
b. Submit Jenkins pipeline, fill path with `\path\to\ATT`, other field use default or first param.
181-
c. Get singed files from `ATT\Glymur\01000\ExtractedDrivers`.
182-
d. keep files in a zip with the same files (without `.inf`) at the root.
183-
3. Upload the result to `s3://qaihub-public-assets/llama-cpp/libggml-htp-<sha>.zip`, with public acl.
183+
c. Get signed files from `ATT\Glymur\01000\ExtractedDrivers`.
184+
d. Repack the signed files (without `.inf`) into a zip with the same layout at the root.
185+
3. Commit the result to `qcom-ai-hub/geniex` at `sdk/signed-htp/libggml-htp-<sha>.zip``git lfs install` locally, add the zip on a branch, open a PR titled per [CONTRIBUTING.md](../CONTRIBUTING.md) (for example `chore(release): add signed HTP bundle for llama.cpp <sha>`), and get a maintainer to squash-merge into `main`.
184186
4. Re-run the Release workflow for the same tag.
185187

186188
## Windows installer signing gate

0 commit comments

Comments
 (0)