o1vm CI #1884
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: o1vm CI | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # every day at midnight | |
| workflow_dispatch: {} | |
| env: | |
| # https://doc.rust-lang.org/cargo/reference/profiles.html#release | |
| # Disable for the time being since it fails with the "attempt to multiply with | |
| # overflow" error. | |
| # Known issue yeat to be fixed. | |
| # RUSTFLAGS: -Coverflow-checks=y -Cdebug-assertions=y | |
| # https://doc.rust-lang.org/cargo/reference/profiles.html#incremental | |
| CARGO_INCREMENTAL: 1 | |
| # https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions | |
| CARGO_TERM_COLOR: always | |
| # 30 MB of stack for Keccak tests | |
| RUST_MIN_STACK: 31457280 | |
| jobs: | |
| load-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| rust-msrv: ${{ steps.versions.outputs.rust-msrv }} | |
| rust-stable: ${{ steps.versions.outputs.rust-stable }} | |
| rust-beta: ${{ steps.versions.outputs.rust-beta }} | |
| ocaml-version: ${{ steps.versions.outputs.ocaml-version }} | |
| python-version: ${{ steps.versions.outputs.python-version }} | |
| go-version: ${{ steps.versions.outputs.go-version }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github | |
| - name: Load versions | |
| id: versions | |
| uses: ./.github/actions/load-versions | |
| clippy-o1vm: | |
| name: Clippy o1vm (${{ matrix.rust_toolchain }}) | |
| needs: ['load-versions'] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust_toolchain: | |
| - ${{ needs.load-versions.outputs.rust-msrv }} | |
| - ${{ needs.load-versions.outputs.rust-stable }} | |
| - ${{ needs.load-versions.outputs.rust-beta }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Use shared OCaml setting up steps | |
| uses: ./.github/actions/ocaml-shared | |
| with: | |
| ocaml_version: ${{ needs.load-versions.outputs.ocaml-version }} | |
| - name: Install Rust ${{ matrix.rust_toolchain }} | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust_toolchain }} | |
| components: clippy | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: o1vm-${{ matrix.rust_toolchain }} | |
| - name: Run clippy on o1vm (${{ matrix.rust_toolchain }}) | |
| env: | |
| RUSTUP_TOOLCHAIN: ${{ matrix.rust_toolchain }} | |
| run: | | |
| eval $(opam env) | |
| make lint-all | |
| run_o1vm_with_cached_data: | |
| name: Run o1vm with cached data | |
| needs: ['load-versions'] | |
| runs-on: ["ubuntu-latest"] | |
| services: | |
| o1vm-e2e-testing-cache: | |
| image: o1labs/proof-systems:o1vm-e2e-testing-cache | |
| volumes: | |
| - /tmp:/tmp/cache | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Use shared Rust toolchain setting up steps | |
| uses: ./.github/actions/toolchain-shared | |
| with: | |
| rust_toolchain_version: ${{ needs.load-versions.outputs.rust-msrv }} | |
| # FIXME: currently not available for 5.0.0. | |
| # It might be related to boxroot dependency, and we would need | |
| # to bump up the ocaml-rs dependency | |
| - name: Use shared OCaml setting up steps | |
| uses: ./.github/actions/ocaml-shared | |
| with: | |
| ocaml_version: ${{ needs.load-versions.outputs.ocaml-version }} | |
| - name: Install the Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ needs.load-versions.outputs.python-version }} | |
| check-latest: true | |
| - name: Install the Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ needs.load-versions.outputs.go-version }} | |
| - name: Install the Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Build the OP program | |
| run: | | |
| cd o1vm | |
| make -C ./ethereum-optimism/op-program op-program | |
| cd .. | |
| - name: Start the local HTTP server | |
| run: | | |
| python -m http.server 8765 & | |
| # | |
| # Tests | |
| # | |
| - name: Execute o1vm in E2E flavor using cached data | |
| run: | | |
| eval $(opam env) | |
| cd o1vm | |
| unzip -q -o /tmp/o1vm-e2e-testing-cache.zip -d ./ | |
| RUST_LOG=debug RUN_WITH_CACHED_DATA="y" FILENAME="env-for-latest-l2-block.sh" O1VM_FLAVOR="pickles" STOP_AT="=3000000" ./run-code.sh |