Repository navigation
Download libusb, Mbed TLS and libssh with retries and a CI cache - #131
Merged
Merged
Conversation
GitHub's release-asset server sometimes sends HTTP 618 ("jwt:expired")
for a short time. One failed request stopped the configure step: the
libusb download in the Android build, release and device jobs, and the
Mbed TLS download in the Apple engine job and the native job (main
after #128 and #130, and the D-Modem bump pull request #129).
cmake/download.cmake has dmodem_download(), the same function as
D-Modem's (D-Modem/D-Modem#259). It tries the download again after 5,
10, 20 and 40 s and checks the SHA-256 on each attempt. libusb.cmake and
native-ssh's BundledLibssh.cmake now use it. ExternalProject unpacks the
local tarballs.
DMODEM_DOWNLOAD_CACHE (a CMake variable or an environment variable) is
a directory that keeps the tarballs. The Android and Apple jobs keep it
with actions/cache, so a build downloads them only when a version
changes.
Tested with a local server that fails the first request: the configure
step passes on the second attempt, and a second configure copies the
tarballs from the cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRU5FgB38hBPKmc9VHT
Signed-off-by: Neo-Desktop <321592+Neo-Desktop@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sydney · project thread
Problem
The Android and Apple workflows fail on main (after #128 and #130) and on the D-Modem bump PR #129. The cause is not in those changes. GitHub's release-asset server sometimes sends HTTP 618 (
jwt:expired). One failed request stops the CMake configure step:app/src/main/cpp/usb/libusb.cmake): Android build, release and device jobs.native-ssh/cmake/BundledLibssh.cmake): Apple engine job and the native job.The
permissions: contents: readchange in #130 does not cause a failure. No job in android.yml or apple.yml writes to the repository.Change
cmake/download.cmake:dmodem_download(), the same function as D-Modem's (cmake: retry the libusb download D-Modem#259). It tries again after 5, 10, 20 and 40 s and checks the SHA-256 on each attempt.DMODEM_DOWNLOAD_CACHEkeeps the tarballs. The Android and Apple jobs keep it withactions/cache.Test
Generated by Claude Code