Typically, mixing different versions of GitHub actions may lead to hard
to fix issues. As many libraries have been updated to use actions v4,
also bump our own `actions/checkout@v2`, `actions/checkout@v3`,
`actions/cache@v2` and `actions/cache@v3` to their `@v4` equivalents.
The various major versions of `action/upload-artifact` and
`action/download-artifact` are not necessarily compatible.
Align all the uploads / downloads to `v3`.
`v4` exists but is not currently supported on GHES yet.
To prevent accidental breakage of builds with non-standard developer
flags, add the `-d:has_deposit_root_checks` build to CI. This is only
a quick compilation check, and is only run on Linux.
This PR causes a few new warnings to appear - these are harmless but
will need addressing separately as they span several libraries.
* new asyncraises syntax
* asyncraises support in several modules
* `sink` usage reduces spurious copying
* `?` compatiblity for `async` + `results`
* remove `-d:chronosStrictException` (obsolete)
Git by defaults returns commit timestamp according to the committer's
time zone instead of the local one, breaking the simple alphanumeric
comparison for timestamps that we use in lint. Force the timezone to
UTC so that comparison is correct regardless of committer timezone.
When bumping to a more recent commit than the configured `branch`,
currently the lint error message is confusing:
```
fatal: error processing shallow info: 4
Submodule 'vendor/nim-chronos': Failed to fetch 'master':
```
This happens when the selected commit is more recent than the latest
one on the `branch`. Comparing the commit dates allows a better message.
CI Lint check failed when bumping to a commit outside default shallow
range. Deepen the checkout through the bumped commit date to ensure
history is available for the ancestry check.
Running the lint checks separately allows running tests to check code
correctness even when targeting non-master branches or having outdated
copyright headers.
Currently CI only tests against status `version-1-6` branch.
Update to test against the selected commit through submodule lock,
as well as the latest upstream `version-1-6` instead.
It occurs sometimes that a submodule is bumped to a PR commit instead of
the corresponding canonical branch (as registered in `.gitmodules`).
Because we typically use `squash`, that PR commit can subsequently
become unreachable, randomly breaking the build of `nimbus-eth2`.
Prevent these accidents by only allowing submodule bumps to commits
on the branch registered in `.gitmodules`. On private branches, simply
update `.gitmodules` to match the personal dev branch.
Instead of comparing against current base branch head, use the common
ancestor of the PR and the base branch to avoid false positives when
a year was bumped in the base branch but not yet merged into the PR.
The `SAFE_SLOTS_TO_UPDATE_JUSTIFIED` constant is no longer used as the
bouncing attack fix was removed:
https://github.com/ethereum/consensus-specs/pull/3290
Note: Some test networks still define the constant, ignoring the config
constant for now until it is no longer used.
When only submodules were bumped but no other changes are committed,
`git diff` returns empty list, and `grep` returns 1. Suppress `grep`
error to prevent CI fail in that case.