From 583f4266762e81e5a452a459ab1a3a1fdf6c5597 Mon Sep 17 00:00:00 2001 From: Dori Medini Date: Wed, 24 Jul 2024 10:33:41 +0300 Subject: [PATCH] chore: improve blockifier CI trigger and scope Signed-off-by: Dori Medini --- .github/workflows/blockifier_ci.yml | 11 ++++++++++- .github/workflows/blockifier_compiled_cairo.yml | 7 ++++++- .github/workflows/blockifier_coverage.yml | 5 ++--- .github/workflows/blockifier_post-merge.yml | 5 ++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 2b4ea730eb..7b304a313a 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,10 +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' + - 'blockifier.Dockerfile' + - 'build_native_blockifier_in_docker.sh' - 'crates/blockifier/**' - 'crates/native_blockifier/**' - - 'build_native_blockifier_in_docker.sh' - '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 c4111b1118..b134f44429 100644 --- a/.github/workflows/blockifier_compiled_cairo.yml +++ b/.github/workflows/blockifier_compiled_cairo.yml @@ -4,17 +4,22 @@ on: push: branches: - main + - main-v[0-9].** tags: - v[0-9].** paths: + - '.github/workflows/blockifier_compiled_cairo.yml' - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' pull_request: types: - opened - reopened - synchronize paths: + - '.github/workflows/blockifier_compiled_cairo.yml' - 'crates/blockifier/feature_contracts/cairo0/**' + - 'crates/blockifier/tests/requirements.txt' jobs: verify_cairo_file_dependencies: @@ -38,4 +43,4 @@ jobs: - run: pip install -r crates/blockifier/tests/requirements.txt; - cargo test verify_feature_contracts -- --include-ignored + cargo test -p blockifier verify_feature_contracts -- --include-ignored diff --git a/.github/workflows/blockifier_coverage.yml b/.github/workflows/blockifier_coverage.yml index fd5541d041..d249bde74f 100644 --- a/.github/workflows/blockifier_coverage.yml +++ b/.github/workflows/blockifier_coverage.yml @@ -3,10 +3,9 @@ name: Blockifier-Coverage on: pull_request: paths: + - '.github/workflows/blockifier_coverage.yml' - 'crates/blockifier/**' - push: - paths: - - 'crates/blockifier/**' + - 'crates/native_blockifier/**' jobs: coverage: diff --git a/.github/workflows/blockifier_post-merge.yml b/.github/workflows/blockifier_post-merge.yml index 4de0e4e9a9..c53733298f 100644 --- a/.github/workflows/blockifier_post-merge.yml +++ b/.github/workflows/blockifier_post-merge.yml @@ -5,7 +5,10 @@ on: types: - closed paths: + - '.github/workflows/blockifier_post-merge.yml' - 'crates/blockifier/**' + - 'crates/native_blockifier/**' + jobs: if_merged: if: github.event.pull_request.merged == true @@ -29,4 +32,4 @@ jobs: - run: | pip install -r crates/blockifier/tests/requirements.txt - cargo test -- --include-ignored + cargo test -p blockifier -p native_blockifier -- --include-ignored