From 1534cf1c9304dbb1b95ddf8cd0ff975988582ae5 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Tue, 24 Nov 2026 04:08:14 -0500 Subject: [PATCH] fix(ci): cache the Windows launcher services so hosted runners finish within the job limit (#3139) * fix(ci): cache the Windows launcher services so hosted runners finish within the job limit * fix(ci): save each launcher build as soon as it finishes, and install both linkers for Rockstar --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3d1132a1b..43d90e5d17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -572,23 +572,65 @@ jobs: SOURCE_TREE: ${{ needs.source.outputs.tree-sha }} run: python3 tools/components/prepare.py unpack --tree "$SOURCE_TREE" + # A hosted runner needs over 20 minutes per launcher; rebuild only when its sources change, and save each + # build as soon as it finishes so a later timeout cannot discard it. + - name: Restore the Ubisoft launcher build + id: ubisoft-cache + uses: actions/cache/restore@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-ubisoft + key: ubisoft-launcher-v1-${{ steps.rust.outputs.rustc }}-${{ hashFiles('tools/ubisoft-launcher/src/**', 'tools/ubisoft-launcher/Cargo.toml', 'tools/ubisoft-launcher/Cargo.lock', 'tools/ubisoft-launcher/build.sh', 'tools/ubisoft-launcher/build.rs', 'tools/ubisoft-launcher/.cargo/**') }} - name: Ubisoft launcher service (x86_64-pc-windows-gnu) + if: steps.ubisoft-cache.outputs.cache-hit != 'true' run: | set -euo pipefail command -v x86_64-w64-mingw32-gcc >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq gcc-mingw-w64-x86-64; } bash tools/ubisoft-launcher/build.sh + - name: Save the Ubisoft launcher build + if: steps.ubisoft-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-ubisoft + key: ${{ steps.ubisoft-cache.outputs.cache-primary-key }} + - name: Restore the Rockstar launcher build + id: rockstar-cache + uses: actions/cache/restore@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-rockstar + key: rockstar-launcher-v1-${{ steps.rust.outputs.rustc }}-${{ hashFiles('tools/rockstar-launcher/src/**', 'tools/rockstar-launcher/Cargo.toml', 'tools/rockstar-launcher/Cargo.lock', 'tools/rockstar-launcher/build.sh', 'tools/rockstar-launcher/build.rs', 'tools/rockstar-launcher/.cargo/**') }} - name: Rockstar launcher service (32-bit and 64-bit) + if: steps.rockstar-cache.outputs.cache-hit != 'true' run: | set -euo pipefail command -v i686-w64-mingw32-gcc >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq gcc-mingw-w64-i686; } + command -v x86_64-w64-mingw32-gcc >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq gcc-mingw-w64-x86-64; } bash tools/rockstar-launcher/build.sh + - name: Save the Rockstar launcher build + if: steps.rockstar-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-rockstar + key: ${{ steps.rockstar-cache.outputs.cache-primary-key }} + - name: Restore the Epic launcher build + id: epic-cache + uses: actions/cache/restore@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-epic + key: epic-launcher-v1-${{ steps.rust.outputs.rustc }}-${{ hashFiles('tools/epic-launcher/src/**', 'tools/epic-launcher/Cargo.toml', 'tools/epic-launcher/Cargo.lock', 'tools/epic-launcher/build.sh', 'tools/epic-launcher/build.rs', 'tools/epic-launcher/.cargo/**') }} - name: Epic Games Launcher parent stand-in (x86_64-pc-windows-gnu) + if: steps.epic-cache.outputs.cache-hit != 'true' run: | set -euo pipefail command -v x86_64-w64-mingw32-gcc >/dev/null || { sudo apt-get update -qq && sudo apt-get install -y -qq gcc-mingw-w64-x86-64; } bash tools/epic-launcher/build.sh + - name: Save the Epic launcher build + if: steps.epic-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: app/src/main/assets/linuxfs/usr/local/lib/droiddeck-epic + key: ${{ steps.epic-cache.outputs.cache-primary-key }} - uses: actions/download-artifact@v4 with: