From 86ef5b0136a28688ded6fd3b60af104b5da7b47b Mon Sep 17 00:00:00 2001 From: dorimedini-starkware Date: Mon, 12 Aug 2024 11:49:26 +0300 Subject: [PATCH] chore: improve blockifier CI trigger and scope (#76) Signed-off-by: Dori Medini --- .github/workflows/blockifier_ci.yml | 11 +++++++++-- .github/workflows/blockifier_compiled_cairo.yml | 5 ++++- .github/workflows/blockifier_coverage.yml | 5 +---- .github/workflows/blockifier_post-merge.yml | 4 +++- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 46197b8e02..8612e4134f 100644 --- a/.github/workflows/blockifier_ci.yml +++ b/.github/workflows/blockifier_ci.yml @@ -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: @@ -18,12 +20,17 @@ 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: diff --git a/.github/workflows/blockifier_compiled_cairo.yml b/.github/workflows/blockifier_compiled_cairo.yml index 878623b641..83e57f82d0 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -4,11 +4,13 @@ on: push: branches: - main + - main-v[0-9].** tags: - v[0-9].** paths: - - 'crates/blockifier/feature_contracts/cairo0/**' - '.github/workflows/blockifier_compiled_cairo.yml' + - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' pull_request: types: - opened @@ -17,6 +19,7 @@ on: paths: - '.github/workflows/blockifier_compiled_cairo.yml' - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' jobs: verify_cairo_file_dependencies: diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index 23cfb58bed..b22c50aefc 100644 --- a/.github/workflows/blockifier_coverage.yml +++ b/.github/workflows/blockifier_coverage.yml @@ -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: diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml index 4015aab921..194fb23475 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -7,6 +7,8 @@ on: paths: - '.github/workflows/blockifier_post-merge.yml' - 'crates/blockifier/**' + - 'crates/native_blockifier/**' + jobs: if_merged: if: github.event.pull_request.merged == true @@ -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