Skip to content

Commit

Permalink
chore: merge branch main-v0.13.2 into main (with conflicts)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorimedini-starkware committed Aug 12, 2024
2 parents f8a57da + ce118c1 commit d28051c
Show file tree
Hide file tree
Showing 84 changed files with 282 additions and 335 deletions.
25 changes: 25 additions & 0 deletions .github/actions/install_rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Installs rust toolchain. In order to set/fix the version, edit DEFAULT_TOOLCHAIN env variable.
inputs:
components:
description: "An optional parameter that will be sent to dtolnay/rust-toolchain."
required: false
type: string

runs:
using: "composite"
steps:
- name: Define toolchain
run: echo "DEFAULT_TOOLCHAIN=stable" >> $GITHUB_ENV
shell: bash
- name: install rust toolchain with given components
if: "${{ inputs.components != '' }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.DEFAULT_TOOLCHAIN }}
components: ${{ inputs.components }}

- name: install rust toolchain without given components
if: "${{ inputs.components == '' }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.DEFAULT_TOOLCHAIN }}
15 changes: 11 additions & 4 deletions .github/workflows/blockifier_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- main-v[0-9].**
tags:
- v[0-9].**
# TODO(Dori, 1/9/2024): Decide when exactly native-blockifier artifacts will be built. Until
# then, keep the 'paths' key empty and build on every push to a release branch / tag.

pull_request:
types:
Expand All @@ -18,19 +20,24 @@ on:
- auto_merge_enabled
- edited
paths:
# Other than code-related changes, all changes related to the native-blockifier build-and-push
# process should trigger the build (e.g., changes to the Dockerfile, build scripts, etc.).
- '.github/workflows/blockifier_ci.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'build_native_blockifier_in_docker.sh'
- 'crates/blockifier/**'
- 'crates/native_blockifier/**'
- 'build_native_blockifier_in_docker.sh'
- 'scripts/build_native_blockifier.sh'
- 'scripts/blockifier.Dockerfile'
- 'scripts/build_native_blockifier.sh'
- 'scripts/install_build_tools.sh'

jobs:
featureless-build:
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust-ubuntu-20.04"
Expand All @@ -41,7 +48,7 @@ jobs:
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust

- uses: Swatinem/rust-cache@v2
with:
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/blockifier_compiled_cairo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,41 @@ on:
- v[0-9].**
paths:
- '.github/workflows/blockifier_compiled_cairo.yml'
<<<<<<< HEAD
- 'crates/blockifier/feature_contracts/**'
- 'crates/blockifier/src/test_utils/cairo_compile.rs'
- 'crates/blockifier/tests/feature_contracts_compatibility_test.rs'
- 'crates/blockifier/tests/requirements.txt'
||||||| 8134c27b
=======
- 'crates/blockifier/feature_contracts/cairo0/**'
- 'crates/blockifier/tests/requirements.txt'
>>>>>>> origin/main-v0.13.2
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- '.github/workflows/blockifier_compiled_cairo.yml'
<<<<<<< HEAD
- 'crates/blockifier/feature_contracts/**'
- 'crates/blockifier/src/test_utils/cairo_compile.rs'
- 'crates/blockifier/tests/feature_contracts_compatibility_test.rs'
- 'crates/blockifier/tests/requirements.txt'
||||||| 8134c27b
- 'crates/blockifier/feature_contracts/cairo0/**'
=======
- 'crates/blockifier/feature_contracts/cairo0/**'
- 'crates/blockifier/tests/requirements.txt'
>>>>>>> origin/main-v0.13.2

jobs:
verify_cairo_file_dependencies:
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Noelware/setup-protoc@1.1.0
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust-ubuntu-20.04"
Expand All @@ -46,6 +58,7 @@ jobs:
LD_LIBRARY_PATH: ${{ env.Python3_ROOT_DIR }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV

<<<<<<< HEAD
# Checkout sequencer into a dedicated directory - technical requirement in order to be able to checkout `cairo` in a sibling directory.
- name: checkout sequencer into `sequencer` directory.
uses: actions/checkout@v4
Expand All @@ -71,3 +84,12 @@ jobs:
cd sequencer &&
pip install -r crates/blockifier/tests/requirements.txt &&
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored
||||||| 8134c27b
- run:
pip install -r crates/blockifier/tests/requirements.txt;
cargo test verify_feature_contracts -- --include-ignored
=======
- run:
pip install -r crates/blockifier/tests/requirements.txt;
cargo test -p blockifier --test feature_contracts_compatibility_test --features testing -- --include-ignored
>>>>>>> origin/main-v0.13.2
7 changes: 2 additions & 5 deletions .github/workflows/blockifier_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ on:
paths:
- '.github/workflows/blockifier_coverage.yml'
- 'crates/blockifier/**'
push:
paths:
- '.github/workflows/blockifier_coverage.yml'
- 'crates/blockifier/**'
- 'crates/native_blockifier/**'

jobs:
coverage:
Expand All @@ -17,7 +14,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
with:
prefix-key: "v0-rust-ubuntu-20.04"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/blockifier_post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
paths:
- '.github/workflows/blockifier_post-merge.yml'
- 'crates/blockifier/**'
- 'crates/native_blockifier/**'

jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Noelware/setup-protoc@1.1.0
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -31,4 +33,4 @@ jobs:

- run: |
pip install -r crates/blockifier/tests/requirements.txt
cargo test -- --include-ignored
cargo test -p blockifier -p native_blockifier -- --include-ignored
8 changes: 4 additions & 4 deletions .github/workflows/committer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
- '.github/workflows/committer_ci.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/committer/**'
- 'crates/committer_cli/**'
- 'crates/starknet_committer/**'
- 'crates/starknet_patricia/**'

pull_request:
types:
Expand All @@ -26,16 +26,16 @@ on:
- '.github/workflows/committer_ci.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- 'crates/committer/**'
- 'crates/committer_cli/**'
- 'crates/starknet_committer/**'
- 'crates/starknet_patricia/**'

jobs:
run-regression-tests:
runs-on: starkware-ubuntu-latest-small
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2

- id: auth
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2

# Commit hash on pull request event would be the head commit of the branch.
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: starkware-ubuntu-20-04-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: dtolnay/rust-toolchain@master # TODO(Nimrod, 15/8/2024): Use stable toolchain.
with:
components: rustfmt
toolchain: nightly-2024-04-29
Expand All @@ -58,7 +58,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Noelware/setup-protoc@1.1.0
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
with:
components: clippy
- uses: Swatinem/rust-cache@v2
Expand All @@ -83,7 +83,7 @@ jobs:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
Expand All @@ -97,7 +97,7 @@ jobs:
with:
# Fetch the entire history.
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Noelware/setup-protoc@1.1.0
- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
runs-on: starkware-ubuntu-latest-small
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: baptiste0928/cargo-install@v3
with:
Expand All @@ -159,7 +159,7 @@ jobs:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
Expand All @@ -174,16 +174,16 @@ jobs:
checks: read
statuses: read
steps:
- name: Run Merge Gatekeeper
if: github.event_name != 'merge_group'
- name: Run Merge Gatekeeper on pull request
if: github.event_name == 'pull_request'
uses: upsidr/merge-gatekeeper@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 1200
ignored: "code-review/reviewable"

- name: Run Merge Gatekeeper in Merge Queue
if: github.event_name == 'merge_group'
- name: Run Merge Gatekeeper on Merge Queue || push
if: github.event_name == 'merge_group' || github.event_name == 'push'
uses: upsidr/merge-gatekeeper@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/papyrus_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
runs-on: starkware-ubuntu-latest-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: starkware-ubuntu-latest-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
Expand All @@ -79,7 +79,7 @@ jobs:
runs-on: starkware-ubuntu-latest-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0
with:
Expand All @@ -96,7 +96,7 @@ jobs:
runs-on: starkware-ubuntu-latest-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- uses: Noelware/setup-protoc@1.1.0

Expand All @@ -109,7 +109,7 @@ jobs:
runs-on: starkware-ubuntu-latest-medium
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- name: Set-Up
run: |
sudo apt-get update
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
filters: |
target_directory:
- 'crates/papyrus_storage/src/db/**'
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
# repeat this job 32 times. this is a random test for part of the code that may cause a corrupted database.
- run: for run in {1..32}; do cargo test -r -p papyrus_storage -- --include-ignored common_prefix_compare_with_simple_table_random; done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/papyrus_nightly-tests-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: ./.github/actions/install_rust
- uses: Swatinem/rust-cache@v2
- run: sudo apt update; sudo apt -y install libclang-dev
# Install libclang-dev that is not a part of the ubuntu vm in github actions.
Expand Down
Loading

0 comments on commit d28051c

Please sign in to comment.