diff --git a/.github/workflows/ci_zig.yml b/.github/workflows/ci_zig.yml index 999ca48415..45110a1e95 100644 --- a/.github/workflows/ci_zig.yml +++ b/.github/workflows/ci_zig.yml @@ -137,4 +137,4 @@ jobs: - name: cross compile with llvm run: | - zig build -Dtarget=${{ matrix.target }} -Dllvm + ./ci/retry_flaky.sh zig build -Dtarget=${{ matrix.target }} -Dllvm diff --git a/build.zig.zon b/build.zig.zon index b17614e990..a2c83174c8 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -9,42 +9,42 @@ .lazy = true, }, .roc_deps_aarch64_macos_none = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-macos-none.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-macos-none.tar.xz?response-content-disposition=attachment", .hash = "122044a065bfe8f6286901b110a1b0b5a764f9fcb2d1472a5eeb3423527e95419427", .lazy = true, }, .roc_deps_aarch64_linux_musl = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-linux-musl.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-linux-musl.tar.xz?response-content-disposition=attachment", .hash = "1220949c8b509cbdac3eb9de5656906ea3e777dfea9e7333f32462754cb1d7708bf2", .lazy = true, }, .roc_deps_aarch64_windows_gnu = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-windows-gnu.zip", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/aarch64-windows-gnu.zip?response-content-disposition=attachment", .hash = "1220fcd7dcb6768b907f20369ec6390adb4de41bd5c1c34dc0f1611af50a331b3e01", .lazy = true, }, .roc_deps_arm_linux_musleabihf = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/arm-linux-musleabihf.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/arm-linux-musleabihf.tar.xz?response-content-disposition=attachment", .hash = "122037ecc8654feb3d34da5424ca6a73f140dbd30475e3d4f23a6f29844e799d51a3", .lazy = true, }, .roc_deps_x86_linux_musl = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86-linux-musl.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86-linux-musl.tar.xz?response-content-disposition=attachment", .hash = "12208fbefa56ba6571399c60d96810d00a561af1926cf566e07fc32c748fbbb70ccf", .lazy = true, }, .roc_deps_x86_64_linux_musl = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-linux-musl.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-linux-musl.tar.xz?response-content-disposition=attachment", .hash = "1220aff2ba681359149edde57256206d87695f84d33375082a3a442da9ba8dfc177f", .lazy = true, }, .roc_deps_x86_64_macos_none = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-macos-none.tar.xz", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-macos-none.tar.xz?response-content-disposition=attachment", .hash = "1220a0714d1cd12799885b5217252511012cca5d2d679d318520515d2487b80533db", .lazy = true, }, .roc_deps_x86_64_windows_gnu = .{ - .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-windows-gnu.zip", + .url = "https://github.com/roc-lang/roc-bootstrap/releases/download/zig-0.13.0/x86_64-windows-gnu.zip?response-content-disposition=attachment", .hash = "122070972a9f996fc1a167b78d3a6a8c10f85349f9369383f5e26af1c5eed3cc41b0", .lazy = true, }, @@ -57,4 +57,4 @@ "LICENSE", "legal_details", }, -} +} \ No newline at end of file diff --git a/ci/retry_flaky.sh b/ci/retry_flaky.sh new file mode 100755 index 0000000000..480f2ffd5a --- /dev/null +++ b/ci/retry_flaky.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +for i in {1..3}; do + output="$("$@" 2>&1)" && break + if echo "$output" | grep -q "error: bad HTTP response code: '500 Internal Server Error'"; then + echo "Retrying due to HTTP 500 error ($i/3)..." + sleep 2 + else + echo "$output" + exit 1 + fi +done \ No newline at end of file