Skip to content

Commit 3cc05aa

Browse files
committed
ci: fix release builds and automate tagged releases
1 parent e000a13 commit 3cc05aa

13 files changed

Lines changed: 576 additions & 10 deletions

File tree

.github/workflows/dependency-freshness.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
rust:
1515
runs-on: windows-latest
1616
steps:
17-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@v7
1818
with:
1919
submodules: recursive
2020
- uses: dtolnay/rust-toolchain@stable

.github/workflows/mpv-windows.yml

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@ on:
66
branches: [main]
77
push:
88
branches: [main]
9+
tags: ["v*"]
910
paths:
1011
- "**/*.rs"
1112
- "**/*.slint"
1213
- "**/Cargo.toml"
1314
- "Cargo.lock"
1415
- "mpv.lock.json"
16+
- "vcpkg.json"
17+
- "triplets/**"
18+
- "vcpkg-overlays/**"
1519
- "setup/**"
20+
- "scripts/generate_release_notes.py"
1621
- ".github/workflows/**"
1722

1823
env:
@@ -24,16 +29,49 @@ jobs:
2429
windows:
2530
name: Windows x64
2631
runs-on: windows-2022
32+
env:
33+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
2734
steps:
28-
- uses: actions/checkout@v5
35+
- uses: actions/checkout@v7
2936
with:
3037
submodules: recursive
3138
- uses: dtolnay/rust-toolchain@stable
3239
with:
3340
target: x86_64-pc-windows-msvc
41+
- name: Export GitHub Actions cache environment for vcpkg
42+
uses: actions/github-script@v9
43+
with:
44+
script: |
45+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL);
46+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN);
47+
- name: Cache vcpkg installed packages
48+
uses: actions/cache@v6
49+
with:
50+
path: vcpkg_installed
51+
key: Windows-vcpkg-static-release-v1-${{ hashFiles('vcpkg.json', 'triplets/**', 'vcpkg-overlays/**') }}
52+
restore-keys: |
53+
Windows-vcpkg-static-release-v1-
54+
Windows-vcpkg-static-release-
55+
- name: Install optimized static libtorrent
56+
uses: lukka/run-vcpkg@v11
57+
with:
58+
vcpkgGitCommitId: "84bab45d415d22042bd0b9081aea57f362da3f35"
59+
vcpkgDirectory: "${{ github.workspace }}/vcpkg"
60+
vcpkgJsonGlob: "vcpkg.json"
61+
runVcpkgInstall: true
62+
env:
63+
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
64+
VCPKG_DEFAULT_TRIPLET: x64-windows-static-release
65+
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets
66+
VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/vcpkg-overlays
3467
- uses: Swatinem/rust-cache@v2
3568
- name: Build release
3669
run: cargo build --locked --release --package stremio-native
70+
env:
71+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
72+
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
73+
VCPKGRS_TRIPLET: x64-windows-static-release
74+
PKG_CONFIG_PATH: ${{ github.workspace }}/vcpkg_installed/x64-windows-static-release/lib/pkgconfig
3775
- name: Verify runtime bundle
3876
shell: pwsh
3977
run: |
@@ -46,7 +84,7 @@ jobs:
4684
run: |
4785
set "SKIP_BUILD=1"
4886
call setup\create_setup.cmd
49-
- uses: actions/upload-artifact@v4
87+
- uses: actions/upload-artifact@v7
5088
with:
5189
name: stremio-native-windows-x64
5290
path: |
@@ -61,7 +99,7 @@ jobs:
6199
name: Linux x64
62100
runs-on: ubuntu-24.04
63101
steps:
64-
- uses: actions/checkout@v5
102+
- uses: actions/checkout@v7
65103
with:
66104
submodules: recursive
67105
- uses: dtolnay/rust-toolchain@stable
@@ -72,8 +110,75 @@ jobs:
72110
sudo apt-get install -y build-essential clang cmake ninja-build pkg-config libssl-dev libtorrent-rasterbar-dev libboost-dev libclang-dev libgtk-3-dev libayatana-appindicator3-dev libmpv-dev libfontconfig1-dev libfreetype6-dev libxkbcommon-dev libwayland-dev libx11-xcb-dev libxcb-shape0-dev libxcb-xfixes0-dev libgl1-mesa-dev libegl1-mesa-dev
73111
- name: Build release
74112
run: cargo build --locked --release --package stremio-native
75-
- uses: actions/upload-artifact@v4
113+
- uses: actions/upload-artifact@v7
76114
with:
77115
name: stremio-native-linux-x64
78116
path: target/release/stremio-native
79117
if-no-files-found: error
118+
119+
release:
120+
name: Publish tagged release
121+
needs: [windows, linux]
122+
runs-on: ubuntu-latest
123+
if: startsWith(github.ref, 'refs/tags/v')
124+
permissions:
125+
contents: write
126+
steps:
127+
- uses: actions/checkout@v7
128+
with:
129+
fetch-depth: 0
130+
- name: Download release artifacts
131+
uses: actions/download-artifact@v8
132+
with:
133+
path: artifacts
134+
- name: Prepare release assets
135+
shell: bash
136+
run: |
137+
set -euo pipefail
138+
mkdir -p release
139+
140+
copy_latest() {
141+
local pattern="$1"
142+
local source
143+
source="$(find artifacts -type f -name "$pattern" | sort -V | tail -n 1)"
144+
if [[ -z "$source" ]]; then
145+
echo "Missing required release asset: $pattern" >&2
146+
exit 1
147+
fi
148+
cp "$source" release/
149+
}
150+
151+
copy_latest "StremioSetup-v*-x64.exe"
152+
copy_latest "stremio-native-v*-x86_64-pc-windows-msvc.zip"
153+
154+
linux_binary="$(find artifacts/stremio-native-linux-x64 -type f -name stremio-native | head -n 1)"
155+
if [[ -z "$linux_binary" ]]; then
156+
echo "Missing required Linux release binary" >&2
157+
exit 1
158+
fi
159+
linux_asset="release/stremio-native-${GITHUB_REF_NAME}-x86_64-unknown-linux-gnu"
160+
cp "$linux_binary" "$linux_asset"
161+
chmod +x "$linux_asset"
162+
163+
(cd release && sha256sum * > SHA256SUMS.txt)
164+
find release -maxdepth 1 -type f -printf '%f\n' | sort
165+
- name: Prepare release notes
166+
shell: bash
167+
run: |
168+
previous_tag="$(git describe --tags --abbrev=0 "${GITHUB_REF_NAME}^" 2>/dev/null || true)"
169+
python scripts/generate_release_notes.py \
170+
--repo "${GITHUB_REPOSITORY}" \
171+
--tag "${GITHUB_REF_NAME}" \
172+
--previous-tag "${previous_tag}" \
173+
--asset-dir release \
174+
--changelog CHANGELOG.md \
175+
--output "${GITHUB_WORKSPACE}/RELEASE_BODY.md"
176+
cat "${GITHUB_WORKSPACE}/RELEASE_BODY.md"
177+
- name: Create GitHub release
178+
uses: softprops/action-gh-release@v3
179+
with:
180+
files: release/*
181+
body_path: RELEASE_BODY.md
182+
fail_on_unmatched_files: true
183+
generate_release_notes: false
184+
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') || contains(github.ref, 'rc') }}

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This file records notable changes to Stremio Native relative to the initial source snapshot.
44

5-
## Unreleased - 2026-07-18
5+
## 1.0.0 - 2026-07-18
66

77
### Desktop lifecycle and startup
88

@@ -43,6 +43,8 @@ This file records notable changes to Stremio Native relative to the initial sour
4343
- Disables stream-server's standalone Windows EXE resource table only when it is embedded, preventing duplicate `VERSIONINFO`/icon resources while preserving the GUI executable's own `1.0.0` metadata.
4444
- Preserves only OpenGL state supported by the active context and uses an ES2-compatible RGBA render target, preventing ES3-only libmpv sharing operations from leaking `GL_INVALID_ENUM` into Slint/FemtoVG on Windows.
4545
- Adds clean Windows and Linux release jobs. The Windows job also produces the Inno Setup installer and GitHub updater archive.
46+
- Provisions the optimized static libtorrent 2.0.13 dependency on clean Windows runners through stream-server's pinned vcpkg baseline, overlay, triplet, and GitHub Actions cache.
47+
- Publishes tagged `v*` builds automatically after both platforms pass, with updater-compatible assets, the Linux binary, SHA-256 checksums, direct download links, the matching detailed changelog section, categorized commit links, and a full comparison link.
4648

4749
### Resource baseline
4850

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The native values were captured on July 18, 2026 from the already-running, settl
4545

4646
### 📦 Secure Offline Database Cache (Turso & Limbo)
4747
* **Local-First Database Storage**: Stores all settings, historical logs, and metadata inside a single local database file (`stremio.db`) using the native `turso` engine.
48-
* **Memory-Based Image Loading**: Poster artwork and thumbnails are cached as database blobs and decoded asynchronously on background thread pools (using the Rust `image` crate), keeping your UI rendering at a locked $60\text{ FPS}$ without disk lag.
48+
* **Asynchronous Image Loading**: Poster artwork and thumbnails are fetched, cached, and decoded on bounded background workers, keeping disk and decode work off the UI thread.
4949
* **Privacy-Focused**: No cloud synchronizations, trackers, or telemetry. Your viewing history, settings, and logs remain 100% private and stored locally.
5050

5151
---
@@ -54,6 +54,8 @@ The native values were captured on July 18, 2026 from the already-running, settl
5454

5555
Windows x64 builds automatically download and verify the pinned optimized `libmpv-2.dll`; no media binaries are stored in this repository. Linux builds use the system's dynamic `libmpv` through `pkg-config`. The Windows runtime currently targets the `x86-64-v3` CPU baseline.
5656

57+
Pushing a `v*` tag builds both platforms and publishes a GitHub release automatically after both jobs pass. The release contains the Windows installer, the updater-compatible Windows archive, the Linux x64 binary, SHA-256 checksums, direct download links, version-matched changelog notes, and linked commits since the previous tag.
58+
5759
### 1. Prerequisites
5860
On Windows, install the `x86_64-pc-windows-msvc` Rust toolchain from [rustup.rs](https://rustup.rs/) and the Visual Studio 2022 C++ build tools/Windows SDK. On Linux, install Rust, `pkg-config`, the libmpv development package, and the native GUI packages listed in the release workflow.
5961

docs/implementation-progress.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ The official desktop interaction distinguishes browsing from navigation: a singl
236236
- [x] This durable implementation ledger was created for context compaction.
237237
- [x] Windows CI produces the executable, verified MPV runtime/licenses, installer, and updater archive from a clean checkout.
238238
- [x] Linux CI installs system libmpv development metadata and builds the portable release path.
239+
- [x] Linux MPV artifact hashing is compatible with `sha2` 0.11 without digest-type formatting assumptions.
240+
- [x] Windows CI mirrors stream-server's pinned optimized static libtorrent 2.0.13 vcpkg baseline, overlay, triplet, and GitHub Actions cache instead of relying on runner-local libraries.
241+
- [x] All GitHub Actions references use their current stable major lines; checkout and artifact upload are on v7.
242+
- [x] A pushed `v*` tag automatically waits for Windows and Linux builds, collects updater-compatible assets, writes SHA-256 checksums, and publishes a release with direct downloads, version-matched changelog notes, categorized commit links, and a full comparison link.
239243
- [x] Stremio Core and stream-server dependencies use pinned remote Git revisions for clean CI/CD checkouts.
240244
- [x] Update the implementation ledger, rendering reference, MPV guide, README, and changelog.
241245
- [x] Run `cargo fmt --all`.
@@ -273,6 +277,7 @@ The official desktop interaction distinguishes browsing from navigation: a singl
273277
- [x] Final combined validation passed after the cache, GLES2, immediate Player Back, tray-shutdown, and logo-alignment corrections: `slint-viewer --check .\\app\\ui\\app.slint`, formatting, diff hygiene, and `cargo check --workspace --release` all completed successfully on 2026-07-18.
274278
- [x] One combined validation passed on 2026-07-18 for persisted hydration, FIFO storage, and first-login catalogs: Slint syntax, formatting, diff hygiene, the focused FIFO executor test, and `cargo check --workspace --release` all succeeded.
275279
- [x] Validated the corrected Discover single-click-preview/double-click-details callback path while retaining Library's one-click details behavior: Slint syntax, formatting, diff hygiene, and the release package check passed on 2026-07-18.
280+
- [ ] Confirm the corrected Linux and Windows release jobs pass after the CI dependency patch; failed run `29631460575` identified the `sha2` 0.11 digest-format incompatibility and missing Windows vcpkg toolchain.
276281
- [ ] Restart twice and confirm Continue Watching and Calendar project current data immediately; runtime verification remains with the user.
277282
- [ ] Confirm addon-provider Movie/Series Board cards populate on the first authenticated launch, Discover previews on one click and opens details on double-click, and Library opens details with one click; runtime verification remains with the user.
278283
- [ ] Rebuild and restart, then confirm repeat details visits leave the skeleton immediately and Back remains visible during loading; runtime verification remains with the user.

playback-mpv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ pkg-config = "0.3.33"
1313
reqwest = { workspace = true, features = ["blocking", "rustls"] }
1414
serde = { workspace = true, features = ["derive"] }
1515
serde_json.workspace = true
16-
sha2 = "0.10.9"
16+
sha2 = "0.11.0"
1717
sevenz-rust = "0.6.1"

playback-mpv/build.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ fn validate_file_hash(path: &Path, expected: &str) -> Result<(), io::Error> {
418418
}
419419

420420
fn sha256_file(path: &Path) -> Result<String, io::Error> {
421+
const HEX_DIGITS: &[u8; 16] = b"0123456789abcdef";
422+
421423
let mut reader = BufReader::new(fs::File::open(path)?);
422424
let mut hasher = Sha256::new();
423425
let mut buffer = [0_u8; 128 * 1024];
@@ -428,7 +430,14 @@ fn sha256_file(path: &Path) -> Result<String, io::Error> {
428430
}
429431
hasher.update(&buffer[..read]);
430432
}
431-
Ok(format!("{:x}", hasher.finalize()))
433+
434+
let digest = hasher.finalize();
435+
let mut encoded = String::with_capacity(digest.len() * 2);
436+
for byte in digest.iter().copied() {
437+
encoded.push(char::from(HEX_DIGITS[usize::from(byte >> 4)]));
438+
encoded.push(char::from(HEX_DIGITS[usize::from(byte & 0x0f)]));
439+
}
440+
Ok(encoded)
432441
}
433442

434443
fn validate_sha256(value: &str) -> Result<(), io::Error> {

0 commit comments

Comments
 (0)