Skip to content

Commit

Permalink
Merge branch 'arith-dev' into 1514-call-exceptions-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzogentile404 committed Dec 18, 2024
2 parents 503455c + ffd428f commit 1e0286c
Show file tree
Hide file tree
Showing 224 changed files with 4,241 additions and 1,478 deletions.
48 changes: 48 additions & 0 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 'Setup Testing Environment'
description: 'Checkout repository and install what is needed for building / testing'
inputs:
enable-ssh:
description: 'Enable ability to ssh into session'
required: false
default: false
rust-corset:
description: 'Setup Rust Corset'
required: false
default: false
go-corset:
description: 'Setup Go Corset'
required: false
default: false
github-token:
description: 'Github token (needed for downloading corset)'
required: false

runs:
using: 'composite'
steps:
- name: Setup upterm session
if: ${{ inputs.enable-ssh == 'true' }}
uses: lhotari/action-upterm@v1

- name: Install Go
uses: actions/setup-go@v4

- name: Get Submodules
shell: bash
run: git submodule update --init --recursive linea-constraints

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin

- name: Setup Rust Corset
if: ${{ inputs.rust-corset == 'true' }}
uses: ./.github/actions/setup-rust-corset
with:
github-token: ${{ inputs.github-token }}

- name: Setup Go Corset
if: ${{ inputs.go-corset == 'true' }}
uses: ./.github/actions/setup-go-corset
43 changes: 41 additions & 2 deletions .github/actions/setup-rust-corset/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,51 @@
name: 'Setup rust corset'
description: 'Install rust and rust corset'
inputs:
build:
description: 'Build Corset from Scratch'
required: false
default: true
version:
# Corresponds to the corset release tag for the desired version.
description: 'Corset tag to use'
required: false
default: 'v9.7.17'
asset_id:
# Corresponds to the Github asset id for the asset published as part
# of the release. Specifically, it should be the id for the asset
# "corset_vX.Y.Z_x86_64-unknown-linux-musl.tar.gz" where X.Y.Z is
# the desired version. To figure out the asset id, you'll need to
# access the Github API via e.g. curl --- google it :)
description: 'Github asset id to use (when downloading)'
required: false
default: '203897668'
github-token:
description: 'Github token (needed for download)'
required: false

runs:
using: 'composite'
steps:
- name: Download Corset
shell: bash
if: ${{ inputs.build != 'true' }}
run: |
curl -L \
-H "Accept: application/octet-stream" \
-H "Authorization: Bearer ${{ inputs.github_token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-o corset.tar.gz \
https://api.github.com/repos/Consensys/corset/releases/assets/${{ inputs.assert_id }}
tar xzf corset.tar.gz
mv corset $HOME
- name: Install Rust
if: ${{ inputs.build == 'true' }}
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Corset
- name: Build & Install Corset
if: ${{ inputs.build == 'true' }}
shell: bash
run: RUSTFLAGS=-Awarnings cargo install --git https://github.com/Consensys/corset.git --tag v9.7.17 --locked --force
run: RUSTFLAGS=-Awarnings cargo install --git https://github.com/Consensys/corset.git --tag ${{ inputs.version }} --locked --force
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
33 changes: 11 additions & 22 deletions .github/workflows/gradle-ethereum-tests.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
name: reference tests
name: Daily State Tests

on:
schedule:
- cron: "0 23 * * 1-5"
workflow_dispatch:

env:
CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
ethereum-tests:
runs-on: ubuntu-latest-128
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v3
- name: Setup Test Environment
uses: ./.github/actions/setup-environment
with:
java-version: 21
distribution: temurin

- name: Setup Rust Corset
uses: ./.github/actions/setup-rust-corset
rust-corset: true

- name: Generate zkevm_for_reference_tests.bin
run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd ..
Expand Down Expand Up @@ -58,25 +51,21 @@ jobs:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
name: "Daily Reference Tests (Rust Corset)"
name: "Daily State Tests (Rust Corset)"
status: "${{ job.status }}"
ethereum-tests-go-corset:
runs-on: ubuntu-latest-128
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v3
- name: Setup Test Environment
uses: ./.github/actions/setup-environment
with:
java-version: 21
distribution: temurin

- name: Setup Go Corset
uses: ./.github/actions/setup-go-corset
go-corset: true

- name: Generate zkevm_for_reference_tests.bin
run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd ..
Expand Down Expand Up @@ -110,5 +99,5 @@ jobs:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
name: "Daily Reference Tests (Go Corset)"
name: "Daily State (Go Corset)"
status: "${{ job.status }}"
17 changes: 5 additions & 12 deletions .github/workflows/gradle-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,22 @@ on:
- cron: "0 22 * * 1-5"
workflow_dispatch:

env:
CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
nightly-tests:
runs-on: ubuntu-latest-128
runs-on: gha-runner-scale-set-ubuntu-22.04-amd64-xxl
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v3
- name: Setup Test Environment
uses: ./.github/actions/setup-environment
with:
java-version: 21
distribution: temurin

- name: Setup Go Corset
uses: ./.github/actions/setup-go-corset
go-corset: true

- name: Run Nightly tests
run: GOMEMLIMIT=100GiB ./gradlew nightlyTests
run: GOMEMLIMIT=96GiB ./gradlew nightlyTests
env:
JAVA_OPTS: -Dorg.gradle.daemon=false
CORSET_FLAGS: disable
Expand Down
Loading

0 comments on commit 1e0286c

Please sign in to comment.