Fix rate-limited cloning of LLVM submodule (#569)

## Description

We started seeing rate-limit `429` errors when cloning LLVM (as seen in
e.g. [this failed
run](https://github.com/paritytech/revive/actions/runs/28924583524/job/85809154518)
and [this failed
run](https://github.com/paritytech/revive/actions/runs/28926259175/job/85821336465?pr=564)).
`llvm/llvm-project` now seems to be heavily rate-limited by GitHub.
(Authenticating the clone did not seem to have much effect.)

Even though our resolc build steps only do a treeless clone, all build
steps still did the same clone.

### Changes

* I've instead introduced a `.llvm-version` file that the `get-llvm`
action reads from, eliminating the network request all together.
* `.llvm-version` is meant to be kept in sync with the LLVM submodule
version we use. This is enforced by:
  * Introduced a `check-llvm-version.yml` workflow
* Runs once to check that the recorded version in `.llvm-version`
coincides with the version detected from the submodule.
* The submodule version detection *does* perform a network request as
before, but this is only run once now (when relevant files change),
rather than for all our resolc build jobs.
* Since the differential test jobs require checking out our
revive-differential-tests (rdt) submodule, those checkout steps cloned
not only rdt, but also LLVM. I've updated this to not clone LLVM at all.
This commit is contained in:
LJ authored and GitHub committed 2026-07-08 14:31:39 +02:00
1 parent da547e9dd9
commit 066c6d26f0
4 files changed
+87 -29

No files matched your search

+17 -3
View File
@@ -85,7 +85,12 @@ jobs:
uses: actions/checkout@v6
with:
path: revive
submodules: recursive
# Submodules are initialized selectively below to avoid cloning
# LLVM which is both large and prone to GitHub rate limiting.
submodules: false
- name: Checkout revive-differential-tests
run: git -C revive submodule update --init --recursive --depth=1 revive-differential-tests
- name: Download Binary
uses: actions/download-artifact@v7
@@ -124,7 +129,12 @@ jobs:
uses: actions/checkout@v6
with:
path: revive
submodules: true
# Submodules are initialized selectively below to avoid cloning
# LLVM which is both large and prone to GitHub rate limiting.
submodules: false
- name: Checkout revive-differential-tests
run: git -C revive submodule update --init --depth=1 revive-differential-tests
- name: Compare Bytecode Hashes
uses: ./revive/revive-differential-tests/.github/actions/compare-bytecode-hashes
@@ -154,7 +164,11 @@ jobs:
uses: actions/checkout@v6
with:
path: revive
submodules: recursive
# Submodules are initialized selectively below to avoid cloning LLVM.
submodules: false
- name: Checkout revive-differential-tests
run: git -C revive submodule update --init --recursive --depth=1 revive-differential-tests
- name: Download Binary
uses: actions/download-artifact@v7