-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
331 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,19 +35,19 @@ commands: | |
description: "Restore the cache with pyspec keys" | ||
steps: | ||
- restore_cached_venv: | ||
venv_name: v25-pyspec | ||
venv_name: v30-pyspec | ||
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }} | ||
save_pyspec_cached_venv: | ||
description: Save a venv into a cache with pyspec keys" | ||
steps: | ||
- save_cached_venv: | ||
venv_name: v25-pyspec | ||
venv_name: v30-pyspec | ||
reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }} | ||
venv_path: ./venv | ||
jobs: | ||
checkout_specs: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
# Restore git repo at point close to target branch/revision, to speed up checkout | ||
|
@@ -67,152 +67,134 @@ jobs: | |
- ~/specs-repo | ||
install_pyspec_test: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Install pyspec requirements | ||
command: make install_test | ||
command: make eth2spec | ||
- save_pyspec_cached_venv | ||
test-phase0: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=phase0 | ||
command: make test fork=phase0 | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-altair: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=altair | ||
command: make test fork=altair | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-bellatrix: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=bellatrix | ||
command: make test fork=bellatrix | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-capella: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=capella | ||
command: make test fork=capella | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-deneb: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=deneb | ||
command: make test fork=deneb | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-electra: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=electra | ||
command: make test fork=electra | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-fulu: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=fulu | ||
command: make test fork=fulu | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
test-whisk: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Run py-tests | ||
command: make citest fork=whisk | ||
command: make test fork=whisk | ||
- store_test_results: | ||
path: tests/core/pyspec/test-reports | ||
table_of_contents: | ||
docker: | ||
- image: circleci/node:10.16.3 | ||
working_directory: ~/specs-repo | ||
steps: | ||
- checkout | ||
- run: | ||
name: Check table of contents | ||
command: sudo npm install -g [email protected] && make check_toc | ||
codespell: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
working_directory: ~/specs-repo | ||
steps: | ||
- checkout | ||
- run: | ||
name: Check codespell | ||
command: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell | ||
lint: | ||
docker: | ||
- image: cimg/python:3.12.4 | ||
- image: cimg/python:3.12-node | ||
working_directory: ~/specs-repo | ||
steps: | ||
- restore_cache: | ||
key: v3-specs-repo-{{ .Branch }}-{{ .Revision }} | ||
- restore_pyspec_cached_venv | ||
- run: | ||
name: Install doctoc | ||
command: sudo npm install -g [email protected] | ||
- run: | ||
name: Run linter for pyspec | ||
command: make lint | ||
- run: | ||
name: Run linter for test generators | ||
command: make lint_generators | ||
workflows: | ||
version: 2.1 | ||
test_spec: | ||
|
@@ -245,8 +227,6 @@ workflows: | |
- test-whisk: | ||
requires: | ||
- install_pyspec_test | ||
- table_of_contents | ||
- codespell | ||
- lint: | ||
requires: | ||
- install_pyspec_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,50 +24,25 @@ on: | |
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
table_of_contents: | ||
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs] | ||
steps: | ||
lint: | ||
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
cache: '' | ||
- name: Check table of contents | ||
run: npm install -g [email protected] && make check_toc | ||
|
||
codespell: | ||
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12.4' | ||
cache: '' | ||
- name: Check codespell | ||
run: make codespell | ||
|
||
lint: | ||
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Rust for dependencies | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12.4' | ||
cache: '' | ||
- name: Install pyspec requirements | ||
run: make install_test | ||
- name: Install doctoc | ||
run: npm install -g [email protected] | ||
- name: Run linter for pyspec | ||
run: make lint | ||
- name: Run linter for test generators | ||
run: make lint_generators | ||
|
||
whitespace: | ||
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs] | ||
|
@@ -83,7 +58,7 @@ jobs: | |
pyspec-tests: | ||
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs] | ||
needs: [lint,codespell,table_of_contents] | ||
needs: [lint] | ||
strategy: | ||
matrix: | ||
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "fulu", "whisk"] | ||
|
@@ -97,26 +72,24 @@ jobs: | |
with: | ||
python-version: '3.12.4' | ||
cache: '' | ||
- name: set TEST_PRESET_TYPE | ||
- name: set preset | ||
if: github.event.inputs.test_preset_type != '' | ||
run: | | ||
echo "spec_test_preset_type=${{ github.event.inputs.test_preset_type || env.TEST_PRESET_TYPE }}" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
- name: set preset | ||
if: ${{ (github.event_name == 'push' && github.ref_name != 'master') || github.event_name == 'pull_request' }} | ||
run: | | ||
echo "spec_test_preset_type=${{ env.TEST_PRESET_TYPE}}" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
echo "spec_test_preset_type=${{ env.TEST_PRESET_TYPE }}" >> $GITHUB_ENV | ||
- name: set preset | ||
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
run: | | ||
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
- name: set preset | ||
if: github.event.schedule=='0 0 * * *' | ||
run: | | ||
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV | ||
- name: Install pyspec requirements | ||
run: make install_test | ||
- name: test-${{ matrix.version }} | ||
run: make citest fork=${{ matrix.version }} TEST_PRESET_TYPE=${{env.spec_test_preset_type}} | ||
run: make test fork=${{ matrix.version }} preset=${{ env.spec_test_preset_type }} | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
|
@@ -133,10 +106,8 @@ jobs: | |
with: | ||
python-version: '3.12.4' | ||
cache: '' | ||
- name: Install pyspec requirements | ||
run: make install_test | ||
- name: Run generators with --modcheck | ||
run: make generate_tests modcheck=true 2>&1 | tee consensustestgen.log | ||
run: make gen_all modcheck=true 2>&1 | tee consensustestgen.log | ||
- name: Check for errors | ||
run: | | ||
if grep -q "\[ERROR\]" consensustestgen.log; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ venv | |
.venv | ||
/.pytest_cache | ||
*.swp | ||
.eth2spec | ||
|
||
build/ | ||
output/ | ||
|
Oops, something went wrong.