feat: implement JIT runtime #1763
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTC_WRAPPER: sccache | |
| ALL_BACKENDS: "llvm" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.toolchain }} ${{ matrix.profile }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu", "macos"] | |
| toolchain: ["stable", "nightly"] | |
| profile: ["dev", "release"] | |
| include: | |
| - os: ubuntu | |
| runner: depot-ubuntu-latest | |
| arch: x64 | |
| - os: macos | |
| runner: macos-latest | |
| arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install LLVM (apt) | |
| if: ${{ matrix.os == 'ubuntu' }} | |
| run: sudo .github/scripts/install_llvm_ubuntu.sh | |
| - name: Install LLVM (brew) | |
| if: ${{ matrix.os == 'macos' }} | |
| run: | | |
| v=22 | |
| HOMEBREW_NO_AUTO_UPDATE=1 brew install "llvm@${v}" | |
| prefix="$(brew --prefix llvm@${v})" | |
| echo "LLVM_SYS_${v}1_PREFIX=${prefix}" >> $GITHUB_ENV | |
| echo "${prefix}/bin" >> $GITHUB_PATH | |
| - name: llvm-config | |
| run: llvm-config --version --bindir --libdir | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain }} | |
| - uses: mozilla-actions/sccache-action@v0.0.9 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@nextest | |
| - name: test | |
| run: cargo nextest run --workspace --cargo-profile ${{ matrix.profile }} --features ${{ env.ALL_BACKENDS }} | |
| state-tests: | |
| name: state-tests (${{ matrix.os }}, ${{ matrix.mode }}) | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu", "macos"] | |
| mode: [interpreter, jit, aot] | |
| exclude: | |
| - os: macos | |
| mode: aot | |
| include: | |
| - os: ubuntu | |
| runner: depot-ubuntu-latest-8 | |
| - os: macos | |
| runner: depot-macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout ethereum/tests | |
| run: git submodule update --init --checkout --depth 1 tests/ethereum-tests | |
| - name: Download test fixtures | |
| run: ./scripts/setup-test-fixtures.sh | |
| - name: Install LLVM (apt) | |
| if: ${{ matrix.os == 'ubuntu' }} | |
| run: sudo .github/scripts/install_llvm_ubuntu.sh | |
| - name: Install LLVM (brew) | |
| if: ${{ matrix.os == 'macos' }} | |
| run: | | |
| v=22 | |
| HOMEBREW_NO_AUTO_UPDATE=1 brew install "llvm@${v}" | |
| prefix="$(brew --prefix llvm@${v})" | |
| echo "LLVM_SYS_${v}1_PREFIX=${prefix}" >> $GITHUB_ENV | |
| echo "${prefix}/bin" >> $GITHUB_PATH | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: mozilla-actions/sccache-action@v0.0.9 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@nextest | |
| - name: Run state tests | |
| run: | | |
| cargo nextest run -p revmc --features llvm \ | |
| --no-capture --no-fail-fast \ | |
| -E 'test(statetest::${{ matrix.mode }})' | |
| feature-checks: | |
| runs-on: depot-ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install LLVM | |
| run: sudo .github/scripts/install_llvm_ubuntu.sh | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: mozilla-actions/sccache-action@v0.0.9 | |
| - uses: taiki-e/install-action@cargo-hack | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo hack | |
| run: | | |
| cargo hack check --feature-powerset --depth 2 --workspace \ | |
| --skip llvm-prefer-static --skip prefer-static | |
| clippy: | |
| runs-on: depot-ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install LLVM | |
| run: sudo .github/scripts/install_llvm_ubuntu.sh | |
| - uses: dtolnay/rust-toolchain@clippy | |
| - uses: mozilla-actions/sccache-action@v0.0.9 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo clippy --workspace --all-targets --features ${{ env.ALL_BACKENDS }} | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| docs: | |
| runs-on: depot-ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install LLVM | |
| run: sudo .github/scripts/install_llvm_ubuntu.sh | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: mozilla-actions/sccache-action@v0.0.9 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo doc --workspace --features ${{ env.ALL_BACKENDS }} --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: target/doc | |
| deploy-docs: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| needs: [docs] | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| fmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| success: | |
| name: success | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - test | |
| - state-tests | |
| - feature-checks | |
| - clippy | |
| - docs | |
| - deploy-docs | |
| - fmt | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| allowed-skips: deploy-docs | |
| jobs: ${{ toJSON(needs) }} |