Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor github workflows for reusability #1455

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/setup-go-corset/action.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions .github/actions/setup-rust-corset/action.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 4 additions & 16 deletions .github/workflows/gradle-ethereum-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
Expand Down Expand Up @@ -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:
Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/gradle-nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/gradle-weekly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -116,6 +113,7 @@ jobs:
with:
ssh-private-key: |
${{ secrets.CONSTRAINTS_SSH_KEY }}

- name: Checkout repository
uses: actions/checkout@v3
with:
Expand All @@ -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
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/reference-blockchain-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading