Skip to content

Download libusb, Mbed TLS and libssh with retries and a CI cache - #131

Merged
Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-fh7li5
Dec 1, 2026
Merged

Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-fh7li5

Conversation

@Neo-Desktop

Copy link
Copy Markdown
Collaborator

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:

  • libusb (app/src/main/cpp/usb/libusb.cmake): Android build, release and device jobs.
  • Mbed TLS (native-ssh/cmake/BundledLibssh.cmake): Apple engine job and the native job.

The permissions: contents: read change 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.
  • libusb.cmake and BundledLibssh.cmake use it. ExternalProject unpacks the local tarballs.
  • DMODEM_DOWNLOAD_CACHE keeps the tarballs. The Android and Apple jobs keep it with actions/cache.
  • docs/building.md: one paragraph about the downloads and the cache.

Test

  • Local server that fails the first request: the configure step passes on the second attempt.
  • A second configure copies the tarballs from the cache.
  • The Mbed TLS and libssh ExternalProject steps unpack and patch the local tarballs.

Generated by Claude Code

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>
@Neo-Desktop Neo-Desktop self-assigned this Dec 1, 2026
@Neo-Desktop
Neo-Desktop merged commit e11c83d into main Dec 1, 2026
13 checks passed
@Neo-Desktop
Neo-Desktop deleted the claude/project-thread-fh7li5 branch December 1, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant