Skip to content

Commit

Permalink
fix evmone long build
Browse files Browse the repository at this point in the history
fix uv run fill on empty file set
  • Loading branch information
winsvega committed Oct 22, 2024
1 parent a61c0d8 commit b20eb69
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
8 changes: 6 additions & 2 deletions .github/actions/build-evm-client/evmone/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Reference to branch, commit, or tag to use to build the EVM binary'
required: true
default: 'master'
targets:
description: 'Which targets to build from evmone repo'
required: false
default: 'all'
runs:
using: "composite"
steps:
Expand All @@ -27,5 +31,5 @@ runs:
mkdir -p $GITHUB_WORKSPACE/bin
cd $GITHUB_WORKSPACE/evmone
cmake -S . -B build -DEVMONE_TESTING=ON
cmake --build build --parallel
echo $GITHUB_WORKSPACE/evmone/build/bin/ >> $GITHUB_PATH
cmake --build build --parallel --target ${{ inputs.targets }}
echo $GITHUB_WORKSPACE/evmone/build/bin/ >> $GITHUB_PATH
41 changes: 25 additions & 16 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
echo "Git reference: ${{ github.ref }}"
echo "Git head ref: ${{ github.head_ref }}"
echo "Git base ref: ${{ github.base_ref }}"
echo "Node Version: $(node -v)"
echo "NPM Version: $(npm -v)"
- name: Get all changed python files in tests/ and changes to coverted-ethereum-tests.txt
id: changed-tests
Expand Down Expand Up @@ -88,7 +91,7 @@ jobs:
if: steps.changed-tests.outputs.tests_any_changed == 'true'
id: evm-builder2
with:
type: "main"
targets: "evmone-t8n"

- name: Checkout ethereum/tests
uses: actions/checkout@v4
Expand Down Expand Up @@ -175,7 +178,9 @@ jobs:
mkdir -p fixtures/state_tests
mkdir -p fixtures/eof_tests
uv run fill $files -n auto --until=Cancun --evm-bin evmone-t8n || true >> filloutput.log 2>&1
echo "uv run fill $files --until=Cancun --evm-bin evmone-t8n >> filloutput.log 2>&1"
uv run fill $files --until=Cancun --evm-bin evmone-t8n >> filloutput.log 2>&1
cat filloutput.log
if grep -q "FAILURES" filloutput.log; then
echo "Error: failed to generate .py tests."
Expand Down Expand Up @@ -229,7 +234,9 @@ jobs:
mkdir -p fixtures/eof_tests
if [ -n "$files_fixed" ]; then
uv run fill $files_fixed -n auto --until=Cancun --evm-bin evmone-t8n || true >> filloutput.log 2>&1
echo "uv run fill $files_fixed --until=Cancun --evm-bin evmone-t8n >> filloutput.log 2>&1"
uv run fill $files_fixed --until=Cancun --evm-bin evmone-t8n >> filloutput.log 2>&1
cat filloutput.log
if grep -q "FAILURES" filloutput.log; then
echo "Error: failed to generate .py tests from before the PR."
Expand All @@ -240,21 +247,23 @@ jobs:
echo "Error: failed to generate .py tests from before the PR."
exit 1
fi
filesState=$(find fixtures/state_tests -type f -name "*.json")
filesEOF=$(find fixtures/eof_tests -type f -name "*.json")
BASE_TEST_PATH=${{ github.workspace }}/evmtest_coverage/coverage/BASE_TESTS
mkdir -p $BASE_TEST_PATH
find fixtures/state_tests -type f -name "*.json" -exec cp {} $BASE_TEST_PATH \;
find fixtures/eof_tests -type f -name "*.json" -exec cp {} $BASE_TEST_PATH \;
for file in $BASE_TEST_PATH/*.json; do
if [ -e "$file" ]; then
mv "$file" "${file%.json}_$PREV_COMMIT.json"
fi
done
else
echo "No tests affected from before patch!"
fi
filesState=$(find fixtures/state_tests -type f -name "*.json")
filesEOF=$(find fixtures/eof_tests -type f -name "*.json")
BASE_TEST_PATH=${{ github.workspace }}/evmtest_coverage/coverage/BASE_TESTS
mkdir -p $BASE_TEST_PATH
find fixtures/state_tests -type f -name "*.json" -exec cp {} $BASE_TEST_PATH \;
find fixtures/eof_tests -type f -name "*.json" -exec cp {} $BASE_TEST_PATH \;
for file in $BASE_TEST_PATH/*.json; do
if [ -e "$file" ]; then
mv "$file" "${file%.json}_$PREV_COMMIT.json"
fi
done
- name: Print tests that will be covered
if: ${{ steps.changed-tests.outputs.tests_any_changed == 'true' }}
run: |
Expand Down

0 comments on commit b20eb69

Please sign in to comment.