Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge dashpay#6421: ci: merge bitcoin#30451, add macOS builds to GitH…
…ub Actions, refactor cache keys 106500c ci: add x86_64 macOS cross-compilation build to GitHub Actions (Kittywhiskers Van Gogh) 56d8a8e ci: add SDK (extracted) sources to separate SDK cache (Kittywhiskers Van Gogh) 9841155 ci: cleanup restore keys (Kittywhiskers Van Gogh) 2f28f3e ci: replace `runner.os` with adding CI `Dockerfile` to `hashFiles` (Kittywhiskers Van Gogh) 1d8868b merge bitcoin#30451: remove Darwin ENV unsetting (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Depends on dashpay#6400 * ~~`WINEPREFIX` needs to be overridden because of permissions issues with GitHub Actions ([build](https://github.com/kwvg/dash/actions/runs/11952384181/job/33318706080#step:8:3297))~~ Superseded by [dash#6563](dashpay#6563) * [bitcoin#30451](bitcoin#30451) will enable `ccache` to work with macOS cross-compilation builds (i.e. they will no longer be registered as uncacheable). * After merging in [dash#6564](dashpay#6564), existing caches resulted in across-the-board build failures ([build](https://github.com/dashpay/dash/actions/runs/13290871849/job/37113644102#step:7:2768), [build](https://github.com/dashpay/dash/actions/runs/13290791962/job/37113418275#step:7:2940), [build](https://github.com/dashpay/dash/actions/runs/13289932901/job/37109498600#step:7:2177)) due to differing compiler versions (GCC 13 build on GCC 11 based cache) and differing glibc versions (2.39 build vs 2.35 cache) due to the change from `jammy` (on which the caches were built) to `noble` (the new base image for CI). To prevent this from occurring in the future, we will add CI's [`Dockerfile`](https://github.com/dashpay/dash/blob/265d9b5f9f5af07ff9da3d6fcc318b783d18caea/contrib/containers/ci/Dockerfile) to the `hashFiles()` used to generate the root of the cache key to ensure that the cache is discarded if it is modified. * `runner.os` doesn't help us as it tells us what platform the _runner_ is on and is independent from what the base image in the container is using, we only care about the latter. * The SDKs were cached separately because * The sources cache is shared between variants and the fastest runner (usually a Linux runner) will set the cache and as the download and extraction of the macOS SDK is only done when expected to target macOS, the cache associated with the shared key will not have the requisite SDKs. Then when that cache key is used to pull the sources cache by the macOS build, it will succeed due to a cache hit and then fail building because the compiler cannot locate the SDK. * The build cache is expected to have a higher churn rate as it is tied to the platform, which will trigger more than necessary downloads of the SDK. * If placed here, the cache would need to be re-evaluated if the version of Xcode has been bumped, which involves modifying `depends/hosts/darwin.mk`. Meaning, that file needs to be included when computing `hashFiles()`. But this also would result in unnecessary cache misses for all the platforms that _aren't_ macOS (because the structure of the build key is the same among all variants). ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 106500c PastaPastaPasta: utACK 106500c; gonna do CI on my repo, and push an empty commit and ensure caches are working as expected Tree-SHA512: b51608d8791a0d87b6d43388d4173e31123fd62fc3ae346907102504a454133e7b862bf3be784a3610ebd2b816b2aaab8c1d4a2f33a4400cc6cf7bce380e9adf
- Loading branch information