diff --git a/.github/actions/setup-go-corset/action.yml b/.github/actions/setup-go-corset/action.yml new file mode 100644 index 0000000000..497813b094 --- /dev/null +++ b/.github/actions/setup-go-corset/action.yml @@ -0,0 +1,15 @@ +name: 'Setup go corset' +description: 'Install go and go corset' + +runs: + using: 'composite' + steps: + - name: Setup rust and rust corset + uses: ./.github/actions/setup-rust-corset + + - name: Install Go + uses: actions/setup-go@v4 + + - name: Install Go Corset + shell: bash + run: go install github.com/consensys/go-corset/cmd/go-corset@latest diff --git a/.github/actions/setup-rust-corset/action.yml b/.github/actions/setup-rust-corset/action.yml new file mode 100644 index 0000000000..1690d29f17 --- /dev/null +++ b/.github/actions/setup-rust-corset/action.yml @@ -0,0 +1,12 @@ +name: 'Setup rust corset' +description: 'Install rust and rust corset' + +runs: + using: 'composite' + steps: + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 + + - name: Install Corset + shell: bash + run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force diff --git a/.github/workflows/gradle-ethereum-tests.yml b/.github/workflows/gradle-ethereum-tests.yml index 897178fc3f..230b05a4d8 100644 --- a/.github/workflows/gradle-ethereum-tests.yml +++ b/.github/workflows/gradle-ethereum-tests.yml @@ -28,11 +28,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force + - name: Setup Rust Corset + uses: ./.github/actions/setup-rust-corset - name: Generate zkevm_for_reference_tests.bin run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd .. @@ -79,21 +76,12 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force + - name: Setup Go Corset + uses: ./.github/actions/setup-go-corset - name: Generate zkevm_for_reference_tests.bin run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd .. - - name: Install Go - uses: actions/setup-go@v4 - - - name: Install Go Corset - run: go install github.com/consensys/go-corset/cmd/go-corset@latest - - name: Generate General State Reference Tests run: ./gradlew generateGeneralStateReferenceTests -Dorg.gradle.parallel=true -Dorg.gradle.caching=true env: diff --git a/.github/workflows/gradle-nightly-tests.yml b/.github/workflows/gradle-nightly-tests.yml index ae70ff82d6..1d017c7d19 100644 --- a/.github/workflows/gradle-nightly-tests.yml +++ b/.github/workflows/gradle-nightly-tests.yml @@ -27,18 +27,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force - - - name: Install Go - uses: actions/setup-go@v4 - - - name: Install Go Corset - run: - go install github.com/consensys/go-corset/cmd/go-corset@latest + - name: Setup Go Corset + uses: ./.github/actions/setup-go-corset - name: Run Nightly tests run: GOMEMLIMIT=100GiB ./gradlew nightlyTests diff --git a/.github/workflows/gradle-weekly-tests.yml b/.github/workflows/gradle-weekly-tests.yml index 6a822774d3..f9b9a30a5a 100644 --- a/.github/workflows/gradle-weekly-tests.yml +++ b/.github/workflows/gradle-weekly-tests.yml @@ -28,11 +28,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force + - name: Setup Rust Corset + uses: ./.github/actions/setup-rust-corset - name: Run Weekly tests run: ./gradlew weeklyTests @@ -67,18 +64,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force - - - name: Install Go - uses: actions/setup-go@v4 - - - name: Install Go Corset - run: - go install github.com/consensys/go-corset/cmd/go-corset@latest + - name: Setup Go Corset + uses: ./.github/actions/setup-go-corset - name: Run Weekly tests run: GOMEMLIMIT=196GiB ./gradlew weeklyTests diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 485c60a3fb..80ffff9457 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -77,11 +77,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force + - name: Setup Rust Corset + uses: ./.github/actions/setup-rust-corset - name: Run unit tests run: ./gradlew :arithmetization:test --stacktrace @@ -116,6 +113,7 @@ jobs: with: ssh-private-key: | ${{ secrets.CONSTRAINTS_SSH_KEY }} + - name: Checkout repository uses: actions/checkout@v3 with: @@ -130,18 +128,8 @@ jobs: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force - - - name: Install Go - uses: actions/setup-go@v4 - - - name: Install Go Corset - run: - go install github.com/consensys/go-corset/cmd/go-corset@latest + - name: Setup Go Corset + uses: ./.github/actions/setup-go-corset - name: Run unit tests run: GOMEMLIMIT=26GiB ./gradlew :arithmetization:test diff --git a/.github/workflows/reference-blockchain-tests.yml b/.github/workflows/reference-blockchain-tests.yml index 503c4158bc..13f89cf0e1 100644 --- a/.github/workflows/reference-blockchain-tests.yml +++ b/.github/workflows/reference-blockchain-tests.yml @@ -39,21 +39,13 @@ jobs: with: java-version: 21 distribution: temurin - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Install Corset - run: RUSTFLAGS=-Awarnings cargo install --git ssh://git@github.com/ConsenSys/corset --tag v9.7.15 --locked --force + - name: Setup Go Corset + uses: ./.github/actions/setup-go-corset - name: Generate zkevm_for_reference_tests.bin run: cd ./linea-constraints; make zkevm_for_reference_tests.bin -B; cd .. - - name: Install Go - uses: actions/setup-go@v4 - - - name: Install Go Corset - run: go install github.com/consensys/go-corset/cmd/go-corset@latest - - name: Generate block chain reference tests run: ./gradlew :reference-tests:generateBlockchainReferenceTests -Dorg.gradle.parallel=true -Dorg.gradle.caching=true env: