diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37c39ba..e56053a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,18 +77,17 @@ jobs: - target: x86_64-pc-windows-gnu os: windows-latest name: mhrv-rs-windows-amd64 - - target: i686-pc-windows-msvc - os: windows-latest - name: mhrv-rs-windows-i686 - # Pin Rust 1.77.2 specifically for this target. Rust 1.78 - # (May 2024) raised the Windows MSRV from Win7 to Win10 by - # switching std::time to GetSystemTimePreciseAsFileTime, a - # kernel32 export that doesn't exist on Win7. The whole - # reason this target ships is to support legacy Win7 32-bit - # boxes (#272), so a stock-stable build defeats the purpose. - # 1.77.2 is the last stable that produces a Win7-loadable - # binary; other targets stay on @stable. (Fixes #318.) - rust_toolchain: "1.77.2" + # i686-pc-windows-msvc target was attempted in v1.7.7-v1.7.10 + # to support Windows 7 32-bit users (#272, #318). Removed in + # v1.7.11 because keeping it on Rust 1.77.2 (last Win7-stable) + # is fundamentally fragile: every transitive crate that bumps + # its MSRV (e.g. `time` 0.3.47 needs Cargo manifest features + # only available in Rust 1.78+) breaks the build, and pinning + # transitives is brittle across releases. Win7 users should + # self-build per the README; the project no longer ships a + # prebuilt i686 Win7 binary. Replaced by the existing + # x86_64-pc-windows-gnu (windows-amd64) which covers ~99% of + # active Windows installs (incl. all WoA64 emulation). - target: x86_64-unknown-linux-musl os: [self-hosted, linux, x64, mhrv-build] name: mhrv-rs-linux-musl-amd64 @@ -112,12 +111,7 @@ jobs: # mipsel-softfloat is best-effort: the Rust tier-3 target occasionally # regresses. Letting it fail keeps the main release going so # desktop/Android users aren't blocked by MT7621 router support. - # i686-pc-windows-msvc is similarly best-effort — pinned to Rust - # 1.77.2 for Win7 compat (#318), so a future dep MSRV bump above - # 1.77 will fail this one target. Letting it skip keeps the rest - # of the release unblocked; we'd then choose between dropping the - # target or moving to the tier-3 win7-msvc target with build-std. - continue-on-error: ${{ matrix.mipsel_softfloat == true || matrix.target == 'i686-pc-windows-msvc' }} + continue-on-error: ${{ matrix.mipsel_softfloat == true }} steps: # Heal any root-owned leftovers from a previous mipsel docker @@ -165,21 +159,6 @@ jobs: toolchain: ${{ matrix.rust_toolchain || 'stable' }} targets: ${{ matrix.target }} - # Cargo.lock from main is generated by stable Rust (1.78+ writes - # version=4 lockfiles). Rust 1.77 only understands version=3, so - # the i686 build with the pinned 1.77.2 toolchain bails with - # "failed to parse lock file at: Cargo.lock" before it ever - # touches our code. Drop the committed lockfile only on the pinned - # job — cargo will regenerate it with version=3 against the same - # Cargo.toml. We don't ship a `Cargo.lock` for binary reproducibility - # contracts, so regenerating per-build is safe. - - name: Regenerate Cargo.lock for older toolchain (Win7 i686 only) - if: matrix.rust_toolchain == '1.77.2' - shell: bash - run: | - rm -f Cargo.lock - cargo +${{ matrix.rust_toolchain }} generate-lockfile - # Cache target/ + cargo registry across runs — this is the big # self-hosted speedup. Without it, actions/checkout@v4's default # `git clean -ffdx` wipes target/ between runs and every build is @@ -619,10 +598,33 @@ jobs: with: fetch-depth: 0 - - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: true + # `actions/download-artifact@v4` has been intermittently flaking on + # this workflow with "5 retries exhausted" on a single artifact (~10 + # of 13). Wrap it in a manual retry — usually the second attempt + # succeeds, the third nails any laggards. We use `gh run download` + # against the current run so we don't depend on the release page + # existing yet (it doesn't until the softprops step below runs). + - name: Download all build artifacts (with retries) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p dist + for attempt in 1 2 3; do + if gh run download "${GITHUB_RUN_ID}" --dir dist --repo "${GITHUB_REPOSITORY}"; then + echo "downloaded all artifacts on attempt $attempt" + # `gh run download` puts each artifact in its own subdir; + # flatten so downstream steps that expect dist/ work + # the same as `merge-multiple: true` did. + find dist -type f -mindepth 2 -exec mv -f {} dist/ \; + find dist -type d -empty -delete + ls -la dist/ + exit 0 + fi + echo "download attempt $attempt failed; retrying in 30s..." + sleep 30 + done + echo "::error::failed to download artifacts after 3 attempts" + exit 1 # Compose the GitHub release body from `docs/changelog/v.md` # so the Releases page tells humans what actually changed — @@ -859,10 +861,27 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 - with: - name: mhrv-rs-android-universal - path: apk + # Same retry pattern as the `release` job above — `actions/download-artifact@v4` + # has been flaking on this workflow with 5-retries-exhausted errors. + - name: Download universal APK (with retries) + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p apk + for attempt in 1 2 3; do + if gh run download "${GITHUB_RUN_ID}" \ + --name mhrv-rs-android-universal \ + --dir apk \ + --repo "${GITHUB_REPOSITORY}"; then + echo "downloaded universal APK on attempt $attempt" + ls -la apk/ + exit 0 + fi + echo "download attempt $attempt failed; retrying in 30s..." + sleep 30 + done + echo "::error::failed to download universal APK after 3 attempts" + exit 1 - name: Post to Telegram env: diff --git a/Cargo.lock b/Cargo.lock index 54fc142..76ffd78 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2222,7 +2222,7 @@ dependencies = [ [[package]] name = "mhrv-rs" -version = "1.7.10" +version = "1.7.11" dependencies = [ "base64 0.22.1", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 12cb12a..ebb1b3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mhrv-rs" -version = "1.7.10" +version = "1.7.11" edition = "2021" description = "Rust port of MasterHttpRelayVPN -- DPI bypass via Google Apps Script relay with domain fronting" license = "MIT" diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index f4522f8..c17c485 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -14,8 +14,8 @@ android { applicationId = "com.therealaleph.mhrv" minSdk = 24 // Android 7.0 — covers 99%+ of live devices. targetSdk = 34 - versionCode = 155 - versionName = "1.7.10" + versionCode = 156 + versionName = "1.7.11" // Ship all four mainstream Android ABIs: // - arm64-v8a — 95%+ of real-world Android phones since 2019 diff --git a/docs/changelog/v1.7.11.md b/docs/changelog/v1.7.11.md new file mode 100644 index 0000000..4de1518 --- /dev/null +++ b/docs/changelog/v1.7.11.md @@ -0,0 +1,4 @@ + +• v1.7.10 release page assets منتشر نشد (CI failures): دو bug همزمان بودن — (۱) target `i686-pc-windows-msvc` که در v1.7.7 برای Win7 32-bit اضافه شده بود، در v1.7.10 fail کرد چون Rust 1.77.2 (آخرین stable Win7-compat) نمی‌تونه manifest crate‌های مدرن مثل `time` 0.3.47 رو parse کنه؛ pinning transitive crate‌ها در هر release dep MSRV بمپ می‌کنن غیرقابل دفاع است. (۲) job `release` با `actions/download-artifact@v4` با ۵-retry-exhausted error fail شد. **Fix:** target i686 از matrix حذف شد (کاربران Win7 ۳۲ بیتی باید self-build کنن — instructions در [#318](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/318))؛ release و telegram jobs به `gh run download` با retry loop ۳-attempt تبدیل شدن. v1.7.11 release اولین کاملی هست که از v1.7.9 منتشر می‌شه با همه fixهای v1.7.10 (Apps Script range probe + Android Paste button) plus این workflow fix. +--- +• v1.7.10 release page assets failed to publish (CI failures): two concurrent bugs — (1) the `i686-pc-windows-msvc` target added in v1.7.7 for Win7 32-bit support broke in v1.7.10 because Rust 1.77.2 (the last stable that produces Win7-compatible binaries) can't parse the manifest of modern transitive crates like `time` 0.3.47; pinning transitives at every release where a dep bumps MSRV is brittle and unsustainable. (2) The `release` job's `actions/download-artifact@v4` step hit a 5-retries-exhausted error. **Fix:** dropped the i686 target from the matrix entirely (Win7 32-bit users must self-build now — instructions in [#318](https://github.com/therealaleph/MasterHttpRelayVPN-RUST/issues/318)); the `release` and `telegram` jobs now use `gh run download` with a 3-attempt retry loop. v1.7.11 is the first complete release published since v1.7.9 and ships all the v1.7.10 fixes (Apps Script range probe handling per #337, Android Paste button per #344) along with this workflow repair.