Skip to content

Commit 313a415

Browse files
committed
Add specification references
1 parent 2afa878 commit 313a415

File tree

9 files changed

+16511
-0
lines changed

9 files changed

+16511
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Check Spec References
2+
on: [push, pull_request]
3+
4+
jobs:
5+
check-specrefs:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: Check version consistency
13+
run: |
14+
MAKEFILE_VERSION=$(grep 'CONSENSUS_SPECS_TEST_VERSION ?=' testing/ef_tests/Makefile | sed 's/.*?= //')
15+
ETHSPECIFY_VERSION=$(grep '^version:' specrefs/.ethspecify.yml | sed 's/version: //')
16+
if [ "$MAKEFILE_VERSION" != "$ETHSPECIFY_VERSION" ]; then
17+
echo "Version mismatch between Makefile and ethspecify"
18+
echo " testing/ef_tests/Makefile: $MAKEFILE_VERSION"
19+
echo " specrefs/.ethspecify.yml: $ETHSPECIFY_VERSION"
20+
exit 1
21+
else
22+
echo "Versions match: $MAKEFILE_VERSION"
23+
fi
24+
25+
- name: Install ethspecify
26+
run: python3 -mpip install ethspecify
27+
28+
- name: Update spec references
29+
run: ethspecify process --path=specrefs
30+
31+
- name: Check for differences
32+
run: |
33+
if ! git diff --exit-code -- specrefs >/dev/null; then
34+
echo "Spec references are out-of-date!"
35+
echo ""
36+
git --no-pager diff -- specrefs
37+
exit 1
38+
else
39+
echo "Spec references are up-to-date!"
40+
fi
41+
42+
- name: Check spec references
43+
run: ethspecify check --path=specrefs

0 commit comments

Comments
 (0)