Repository navigation
cmake: support checksum-pinned MDK SDK dependencies - #381
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for verifying the MDK SDK download using a SHA-256 checksum, allowing the use of immutable SDK releases or mirrors. It refactors the dependency setup logic in cmake/deps.cmake into robust helper functions that handle downloading, verification, caching, locking, and backup recovery. Additionally, a comprehensive suite of CMake integration tests has been added to validate these behaviors under various scenarios. I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
b2cd9a5 to
e8b5fcc
Compare
e8b5fcc to
81b0146
Compare
There was a problem hiding this comment.
Pull request overview
Adds checksum-pinned MDK SDK dependency support to the CMake-based dependency setup so builds can be reproducible and cached SDKs are invalidated when the selected archive changes.
Changes:
- Introduces
FVP_DEPS_SHA256(CMake cache + env var) and resolves options with CMake values taking precedence over environment. - Downloads MDK SDK via a temporary
.partfile, verifies SHA-256 (when pinned), and stamps extracted SDKs to prevent stale reuse. - Adds CMake integration tests (including offline and bad-SHA cases) and runs them in GitHub Actions on Ubuntu + Windows; increases Gradle heap for the example Android app.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents checksum-pinned FVP_DEPS_URL + FVP_DEPS_SHA256 usage and cache behavior. |
| example/android/gradle.properties | Raises Gradle JVM heap limit to reduce build OOM risk with current artifacts. |
| cmake/deps.cmake | Implements SHA-256 pinning, safer download/extract flow, cache stamping, and lock-based serialization. |
| cmake/tests/CMakeLists.txt | Adds a CMake/CTest suite that builds fixture archives and defines test cases. |
| cmake/tests/deps_test.cmake | Validates option resolution precedence and cache behaviors (pinned vs unpinned, recovery, offline reuse). |
| cmake/tests/invoke_fetch.cmake | Helper to invoke internal fetch/extract function from tests. |
| cmake/tests/macro_test.cmake | Integration test exercising fvp_setup_deps() in script mode. |
| cmake/tests/macro_bad_sha_test.cmake | Ensures an incorrect SHA-256 fails and (intended to) verifies cleanup of partial downloads. |
| .gitignore | Ignores .part temporary downloads and .fvp-mdk-* staging directories. |
| .github/workflows/build.yml | Adds a CI job to run the new CMake tests on Ubuntu and Windows (Release config for multi-config). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Problem
FVP_DEPS_URLlets users select an immutable MDK SDK release or mirror, but the downloaded archive cannot currently be verified. The extractedmdk-sdkdirectory is also reused based only on the presence ofFindMDK.cmake, so changing the selected artifact can leave stale native binaries in place.This prevents reproducible MDK SDK pinning and lets the same fvp source resolve to different native binaries based on download time and cache state. Related to #368 and #378.
Changes
FVP_DEPS_SHA256CMake and environment settingsFVP_DEPS_LATESTas the existing opt-in rolling update path; an explicit SHA-256 pin takes precedenceCompatibility
The default MDK SDK URL and version selection are unchanged. When
FVP_DEPS_SHA256is unset, existingFVP_DEPS_URLand normal cache behavior remain available. The changes apply only to CMake-backed platforms; CocoaPods and SwiftPM dependency resolution are unchanged. The Gradle memory setting affects only the example Android app.Verification
fvp_setup_deps()git diff --check