Skip to content

test ci

test ci #1844

Workflow file for this run

name: LEVM
on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
- "crates/vm/levm/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.81.0
jobs:
ef-test:
if: ${{ github.event_name != 'merge_group' }}
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Caching
uses: Swatinem/rust-cache@v2
- name: Download EF Tests
run: |
cd crates/vm/levm
make download-evm-ef-tests
- name: Run tests
run: |
cd crates/vm/levm
make run-evm-ef-tests-ci | tee test_result.txt
- name: Show test summary -- full
run: |
cd crates/vm/levm && awk '/Summary: /,0' test_result.txt
- name: Show test summary -- short
run: |
cd crates/vm/levm && awk '/Summary: /,/Frontier/' test_result.txt;
- name: Check EF-TESTS status is 100%
run: |
cd crates/vm/levm
if [ "$(awk '/Summary:/ {print $(NF)}' test_result.txt)" != "(100.00%)" ]; then
echo "Percentage is not 100%."
exit 1
fi
hive-report-creation:
uses: ./.github/workflows/common/hive_reports.yaml

Check failure on line 63 in .github/workflows/ci_levm.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci_levm.yaml

Invalid workflow file

invalid value workflow reference: workflows must be defined at the top level of the .github/workflows/ directory
with:
evm: "levm"
job_type: "trigger"
# Check we don't have a regression against main
hive-test:
if: ${{ github.event_name != 'merge_group' }}
name: Integration Test
needs: hive-report-creation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download results (pr)
uses: actions/download-artifact@v4
with:
name: results_levm_trigger.md
- name: Rename result (1)
run: cp results.md results_levm.md
- name: Download results (main)
uses: actions/download-artifact@v4
with:
name: results_levm_daily.md
# If we don't have the file it will use the result(1) file
continue-on-error: true
- name: Rename result (2)
run: cp results.md results_levm_daily.md
- name: Create diff message
run: |
bash .github/scripts/hive_levm_revm_diff.sh results_levm_daily.md results_levm.md >> diff.md
cat diff.md >> $GITHUB_STEP_SUMMARY
- name: Check Regression
run: |
if grep -q "No differences found" diff.md; then
echo "No regression found."
elif ! grep -q "regression" diff.md; then
echo "No regression found."
else
echo "Differences found."
exit 1
fi
test:
# "Test" is a required check, don't change the name
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Caching
uses: Swatinem/rust-cache@v2
- name: Run tests
run: |
cd crates/vm/levm
make test
bench:
name: Benchmarks (LEVM vs REVM)
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Install hyperfine
uses: taiki-e/install-action@v2
with:
tool: hyperfine@1.16
- name: Install solc
uses: pontem-network/get-solc@master
- name: Run benchmarks
run: |
cd crates/vm/levm
make revm-comparison
lint:
# "Lint" is a required check, don't change the name
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt, clippy
- name: Add Rust Cache
uses: Swatinem/rust-cache@v2
- name: Run cargo check
run: |
cd crates/vm/levm
cargo check
- name: Run cargo build
run: |
cd crates/vm/levm
cargo build
- name: Run cargo clippy
run: |
cd crates/vm/levm
cargo clippy --all-targets --all-features -- -D warnings
- name: Run cargo fmt
run: |
cd crates/vm/levm
cargo fmt --all -- --check