Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/ci-candidate/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Download verified CI candidate
description: Retrieve the preflight-verified archive and fail closed if its bytes changed in transit.
inputs:
digest:
description: SHA-256 of the original immutable CI artifact archive
required: true
runs:
using: composite
steps:
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '24'
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: verified-ci-candidate
path: ci-candidate
- name: Verify the original CI archive before extraction or signing
shell: bash
env:
CI_ARTIFACT_DIGEST: ${{ inputs.digest }}
run: |
node --input-type=module -e '
import { createHash } from "node:crypto";
import { readFileSync } from "node:fs";
const actual = "sha256:" + createHash("sha256").update(readFileSync("ci-candidate/ci-candidate.zip")).digest("hex");
if (actual !== process.env.CI_ARTIFACT_DIGEST) throw new Error("CI artifact checksum mismatch");
'
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
run: sh scripts/test-distribution.sh

check:
name: check (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -83,13 +84,19 @@ jobs:
- run: cargo build --locked --all-targets
- run: cargo test --locked --all-targets
- run: cargo clippy --locked --all-targets -- -D warnings
- name: Validate the Intel app bundle without signing credentials
if: matrix.os == 'macos-15-intel'
- name: Build the unsigned macOS release candidate
if: runner.os == 'macOS'
shell: bash
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-15-intel' && '13.3' || '13.0' }}
run: |
cargo install cargo-packager --version 0.11.8 --locked
cargo build --release --locked
cargo packager --release --formats app
- name: Validate the Intel app bundle without signing credentials
if: matrix.os == 'macos-15-intel'
shell: bash
run: |
sh scripts/prepare-intel-app.sh dist/packages/Mist.app
- name: Test real Intel speech generation
if: matrix.os == 'macos-15-intel'
Expand All @@ -99,13 +106,27 @@ jobs:
run: |
dist/packages/Mist.app/Contents/MacOS/mist --install-model
cargo test --release --locked --test kokoro_smoke -- --ignored --nocapture
ditto -c -k --keepParent dist/packages/Mist.app dist/packages/Mist-intel-ci.zip
- name: Retain the unsigned Intel candidate and runtime provenance
if: matrix.os == 'macos-15-intel'
- name: Archive the unsigned macOS candidate with permissions and provenance
if: runner.os == 'macOS'
run: tar -cf dist/packages/Mist.app.tar -C dist/packages Mist.app
- name: Retain the unsigned macOS candidate
if: runner.os == 'macOS'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: mist-ci-${{ matrix.os == 'macos-latest' && 'macos-aarch64' || 'macos-x86_64' }}-${{ github.sha }}-attempt-${{ github.run_attempt }}
path: dist/packages/Mist.app.tar
retention-days: 90
if-no-files-found: error
- name: Build the unsigned Windows release candidate
if: runner.os == 'Windows'
run: cargo build --release --locked
- name: Retain the unsigned Windows candidate
if: runner.os == 'Windows'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: mist-intel-ci-${{ github.sha }}
path: dist/packages/Mist-intel-ci.zip
name: mist-ci-windows-x86_64-${{ github.sha }}-attempt-${{ github.run_attempt }}
path: target/release/mist.exe
retention-days: 90
if-no-files-found: error
- name: Validate POSIX release installer
if: runner.os != 'Windows'
Expand Down Expand Up @@ -138,7 +159,7 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: ./.github/actions/linux-packages
with:
artifact-name: mist-linux-validation-${{ github.sha }}
artifact-name: mist-ci-linux-${{ github.sha }}-attempt-${{ github.run_attempt }}

quality:
name: Quality and security gates
Expand Down
69 changes: 51 additions & 18 deletions .github/workflows/release-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-22.04
outputs:
channel: ${{ steps.release.outputs.channel }}
ci-run-id: ${{ steps.ci.outputs.ci-run-id }}
artifact-digest: ${{ steps.ci.outputs.artifact-digest }}
permissions:
contents: read
actions: read
Expand Down Expand Up @@ -63,10 +65,18 @@ jobs:
fi
echo "channel=$channel" >> "$GITHUB_OUTPUT"

- name: Verify successful main CI for the exact release commit
- name: Verify platform CI and download its exact-commit candidate
id: ci
env:
GH_TOKEN: ${{ github.token }}
RELEASE_PLATFORM: ${{ inputs.platform }}
CI_CANDIDATE_ARCHIVE: ci-candidate.zip
run: node scripts/verify-release-ci.mjs
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: verified-ci-candidate
path: ci-candidate.zip
if-no-files-found: error

macos:
if: startsWith(inputs.platform, 'macos-')
Expand All @@ -79,12 +89,9 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
- name: Install Rust 1.95
run: |
rustup toolchain install 1.95.0 --profile minimal
rustup default 1.95.0
- uses: ./.github/actions/intel-onnxruntime
if: inputs.platform == 'macos-x86_64'
- uses: ./.github/actions/ci-candidate
with:
digest: ${{ needs.preflight.outputs.artifact-digest }}
- name: Require Apple release credentials
shell: bash
env:
Expand All @@ -101,21 +108,29 @@ jobs:
exit 1
fi
done
- name: Install cargo-packager
run: cargo install cargo-packager --version "$CARGO_PACKAGER_VERSION" --locked
- name: Build app bundle
- name: Extract and validate the CI-built app bundle
run: |
cargo build --release --locked
cargo packager --release --formats app
mkdir -p candidate dist/packages
ditto -x -k ci-candidate/ci-candidate.zip candidate
tar -xf candidate/Mist.app.tar -C dist/packages
/usr/libexec/PlistBuddy -c "Print :NSServices" dist/packages/Mist.app/Contents/Info.plist >/dev/null
test "$(/usr/libexec/PlistBuddy -c 'Print :MistReleaseVersion' dist/packages/Mist.app/Contents/Info.plist)" = "$(tr -d '[:space:]' < VERSION)"
binary=dist/packages/Mist.app/Contents/MacOS/mist
test "$(lipo -archs "$binary")" = "${{ inputs.platform == 'macos-aarch64' && 'arm64' || 'x86_64' }}"
test -f dist/packages/Mist.app/Contents/Resources/licenses/kokoro-micro-NOTICE
test -f dist/packages/Mist.app/Contents/Resources/licenses/kokoro-micro-THIRD_PARTY_LICENSES
test -f dist/packages/Mist.app/Contents/Resources/licenses/NotoSansDevanagariUI-OFL
- name: Validate Intel runtime packaging
if: inputs.platform == 'macos-x86_64'
run: sh scripts/prepare-intel-app.sh dist/packages/Mist.app
run: |
app=dist/packages/Mist.app
binary="$app/Contents/MacOS/mist"
test "$(vtool -show-build "$binary" | awk '$1 == "minos" { print $2 }')" = 13.3
test "$(/usr/libexec/PlistBuddy -c 'Print :LSMinimumSystemVersion' "$app/Contents/Info.plist")" = 13.3
test -z "$(otool -L "$binary" | awk 'NR > 1 && $1 !~ /^\/System\/Library\// && $1 !~ /^\/usr\/lib\// { print $1 }')"
for file in ONNX-Runtime-LICENSE ONNX-Runtime-ThirdPartyNotices.txt ONNX-Runtime-provenance.txt; do
test -s "$app/Contents/Resources/licenses/$file"
done
- name: Import Developer ID certificate
id: keychain
shell: bash
Expand Down Expand Up @@ -206,6 +221,9 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
- uses: ./.github/actions/ci-candidate
with:
digest: ${{ needs.preflight.outputs.artifact-digest }}
- name: Install Rust 1.95
shell: pwsh
run: |
Expand All @@ -227,11 +245,12 @@ jobs:
$PSNativeCommandUseErrorActionPreference = $true
choco install nsis --no-progress -y
cargo install cargo-packager --version $env:CARGO_PACKAGER_VERSION --locked
- name: Build executable
- name: Extract and validate the CI-built executable
shell: pwsh
run: |
$PSNativeCommandUseErrorActionPreference = $true
cargo build --release --locked
New-Item -ItemType Directory -Force target\release | Out-Null
Expand-Archive -LiteralPath ci-candidate\ci-candidate.zip -DestinationPath target\release
$binary = [IO.File]::ReadAllBytes("target\release\mist.exe")
$peOffset = [BitConverter]::ToInt32($binary, 0x3c)
$machine = [BitConverter]::ToUInt16($binary, $peOffset + 4)
Expand Down Expand Up @@ -306,9 +325,23 @@ jobs:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.sha }}
- uses: ./.github/actions/linux-packages
- uses: ./.github/actions/ci-candidate
with:
packager-version: ${{ env.CARGO_PACKAGER_VERSION }}
digest: ${{ needs.preflight.outputs.artifact-digest }}
- name: Extract the CI-validated DEB and AppImage without rebuilding
run: |
mkdir -p dist/release
unzip -q ci-candidate/ci-candidate.zip -d dist/release
test -s dist/release/Mist-linux-x86_64.deb
test -s dist/release/Mist-linux-x86_64.AppImage
chmod 755 dist/release/Mist-linux-x86_64.AppImage
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: mist-linux-x86_64
path: |
dist/release/Mist-linux-x86_64.deb
dist/release/Mist-linux-x86_64.AppImage
if-no-files-found: error

publish_preview:
# Unselected builders are skipped. Override the implicit success() guard,
Expand Down Expand Up @@ -362,4 +395,4 @@ jobs:
gh release create "$GITHUB_REF_NAME" release-assets/* \
--draft --prerelease --verify-tag --latest=false \
--title "Mist $GITHUB_REF_NAME — $RELEASE_PLATFORM preview" \
--notes "Early-access $RELEASE_PLATFORM preview built from $GITHUB_SHA after exact-commit main CI passed. Only this platform is included. Verify SHA256SUMS before installing. The curl/PowerShell installer requires explicit MIST_RELEASE=$GITHUB_REF_NAME, not latest. See the distribution guide for system requirements. Clean-machine installation and speech acceptance remain required before a stable desktop release."
--notes "Early-access $RELEASE_PLATFORM preview promoted from CI run ${{ needs.preflight.outputs.ci-run-id }} for $GITHUB_SHA after shared quality/security and this platform's CI checks passed. No application recompilation in Release. Only this platform is included. Verify SHA256SUMS before installing. The curl/PowerShell installer requires explicit MIST_RELEASE=$GITHUB_REF_NAME, not latest. See the distribution guide for system requirements. Clean-machine installation and speech acceptance remain required before a stable desktop release."
29 changes: 18 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,30 @@ signed release or clean-machine acceptance. Never commit credentials or publish
an unsigned stable release. A pre-release website may show unavailable downloads
or clearly labeled platform previews, following the distribution guide.
Linux, Apple Silicon Mac, Intel Mac, and Windows have independent release
workflows using shared native build/signing logic. One release failure does not
block another platform's draft preview; all still require successful main CI.
workflows using shared native signing/promotion logic. One platform's failed or
unfinished CI does not block another platform's draft preview. Each release
requires the shared metadata/website and quality/security checks, plus its own
native CI checks on the exact merged commit (Linux also needs package validation).
Release runs only for version-tag pushes or manual candidate runs from `main`.
Tests and quality/security analysis belong to CI. Before packaging or signing,
Release verifies the latest push-to-`main` CI run for its exact commit and every
required check from `.github/rulesets/main-quality.json`. A PR merge-ref result,
another commit, a failed/skipped check, or unavailable evidence cannot authorize
a release. Rerun all integration-CI jobs on `main` if evidence is incomplete;
Release does not rerun the test suite or substitute another successful run.
Release verifies the latest push-to-`main` CI run/attempt for its exact commit and
the selected platform's required checks. Main still requires all seven checks
for merging; its ruleset is unchanged. A PR merge-ref result, another commit,
a failed/skipped/missing selected or shared check, or unavailable evidence cannot
authorize a release. CI retains optimized candidates named by platform, SHA, and
attempt. Release downloads the selected immutable artifact by ID, verifies its
SHA-256 before extraction, and promotes it without recompiling the application.
Expired or missing artifacts require a new CI run, not a rebuild in Release.
Mac signing/notarization and DMG creation, and Windows signing/NSIS assembly,
remain in Release. Linux reuses the validated DEB/AppImage byte-for-byte.
Protected signing/publishing environments and draft-only publication remain.
The Linux packaging composite is shared between CI validation and Release.
The Linux packaging composite runs in CI; Release promotes its retained packages.

Intel macOS additionally uses the revision-pinned source build described
in [distribution](docs/DISTRIBUTION.md#intel-macos-runtime). Set its absolute
`ORT_LIB_PATH` before running local checks; ordinary `ort-sys` downloads do not
contain an Intel Mac runtime. The `check (macos-15-intel)` job uses the same
CPU runtime preparation as Release, validates an unsigned release-mode app,
and runs the downloaded-model multilingual smoke test. It receives no signing
credentials. The versioned ruleset and Release verifier require this check;
CPU runtime preparation used to build the release candidate, validates an unsigned
release-mode app, and runs the downloaded-model multilingual smoke test. It receives no signing
credentials. The versioned main ruleset and Intel release verifier require this check;
only the owner may add its new context to the existing server ruleset.
Loading
Loading