Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] WitnessUtils library improvements #919

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/scripts/check_genesis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Run make command
make genesis

sleep 1

# Check if script generates different genesis
git diff --exit-code ./resources/

if [ $? -ne 0 ]; then
echo "Differences found in genesis files."
exit 1
fi

echo "All directories are identical."

exit 0
26 changes: 26 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,29 @@ jobs:
cd crates/evm/src/evm/system_contracts
forge test -vvv
id: test
check_genesis_files:
strategy:
fail-fast: true

name: Check Genesis Files
runs-on: ubicloud-standard-2
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Run check_genesis.sh
run: ./.github/scripts/check_genesis.sh
shell: bash

8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install-dev-tools: ## Installs all necessary cargo helpers
cargo install cargo-udeps
cargo install flaky-finder
cargo install cargo-nextest --locked
cargo install cargo-binstall
cargo install --version 1.6.9 cargo-binstall
cargo binstall cargo-risczero
ifeq ($(shell uname -ms), Darwin x86_64)
cargo risczero build-toolchain
Expand Down Expand Up @@ -109,4 +109,8 @@ pr:

# Set genesis from system contract source files
genesis:
$(MAKE) -C crates/evm/src/evm/system_contracts genesis
$(MAKE) -C crates/evm/src/evm/system_contracts genesis

# Set production genesis from system contract source files
genesis-prod:
$(MAKE) -C crates/evm/src/evm/system_contracts genesis-prod
Loading
Loading