On master (681b25e3cd7d084f642693152322ed9a40f33ba0) SDK (macOS and Android) are not invalidated timely. For instance, during updating macOS SDK in #21851 it is not possible to run a related CI task successfully.
Another flaw is related to Android SDK – the following commands https://github.com/bitcoin/bitcoin/blob/681b25e3cd7d084f642693152322ed9a40f33ba0/ci/test/05_before_script.sh#L25-L32 run regardless of cache state. See CI task log for details.
This PR:
- drops caching of
depends/sdk-sources
in favor of separated caching ofdepends/SDKs/$MACOS_SDK
anddepends/SDKs/android
- establishes conditions for cache invalidation
- bypass unneeded commands when a cache is populated