Unofficial YouTube Music / Spotify Premium client for Android, built in Liquid Glass. Audio effects, Spotify Connect, listening history, 8 languages. Rust core on librespot.
Kotlin alternativeandroidandroid-applicationclientglassmorphisminnertubelibrespotliquid-glassspotifyspotify-connectspotifyapiyoutube-musicyoutube-playerytdlnis
Keep a GitLab outage from failing a release
Lelonio17ed2b87974c
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.ymlindex 1b7fea8..4d18151 100644--- a/.github/actions/setup/action.yml+++ b/.github/actions/setup/action.yml@@ -49,6 +49,15 @@ runs:key: cargo-${{ runner.os }}-${{ hashFiles('native/Cargo.lock', 'native/vendor/**', 'native/src/**') }}restore-keys: cargo-${{ runner.os }}-+ # Bungee and its submodules, kept rather than cloned on every build. One+ # of them, Eigen, lives on GitLab, and GitLab turning requests away under+ # load failed the 2.6.1 release twice in a row. Keyed on the build script,+ # which names the tag; fetchBungee skips the clone when it is there.+ - uses: actions/cache@v6+ with:+ path: native-dsp/bungee+ key: bungee-${{ hashFiles('app/build.gradle.kts') }}+- name: cargo-ndkshell: bashrun: command -v cargo-ndk > /dev/null || cargo install cargo-ndk --version 4.1.2 --lockeddiff --git a/app/build.gradle.kts b/app/build.gradle.ktsindex 835dde4..d7ab90e 100644--- a/app/build.gradle.kts+++ b/app/build.gradle.kts@@ -265,23 +265,36 @@ val fetchBungee by tasks.registering {val target = rootProject.file("native-dsp/bungee")val marker = target.resolve("bungee/Bungee.h")val tag = bungeeTag+ val tries = 3+ val retryMs = 5_000Loutputs.dir(target)doLast {if (marker.exists()) return@doLast- target.deleteRecursively()- target.parentFile.mkdirs()-- val process = ProcessBuilder(- "git", "clone",- "--depth", "1",- "--branch", tag,- "--recurse-submodules", "--shallow-submodules",- "https://github.com/bungee-audio-stretch/bungee.git",- target.absolutePath,- ).inheritIO().start()-- check(process.waitFor() == 0) { "could not clone Bungee $tag into $target" }++ // git's own words kept and put in the failure. Inherited, they went to+ // a daemon's output that CI never shows, and a release failed on+ // "could not clone" with nothing to say which host refused. Tried a+ // few times: the submodules come from three different hosts, and any+ // one of them having a bad minute was a failed release.+ var output = ""+ repeat(tries) { attempt ->+ target.deleteRecursively()+ target.parentFile.mkdirs()+ val process = ProcessBuilder(+ "git", "clone",+ "--depth", "1",+ "--branch", tag,+ "--recurse-submodules", "--shallow-submodules",+ "https://github.com/bungee-audio-stretch/bungee.git",+ target.absolutePath,+ ).redirectErrorStream(true).start()+ output = process.inputStream.bufferedReader().readText()+ if (process.waitFor() == 0 && marker.exists()) return@doLast+ logger.warn("Bungee clone attempt ${attempt + 1} of $tries failed:\n$output")+ if (attempt < tries - 1) Thread.sleep(retryMs * (attempt + 1))+ }+ error("could not clone Bungee $tag into $target:\n$output")}}