From 7ed0cdbc933dcd00d538cf0723e16f29538258fc 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 | 4 +++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/blockifier_ci.yml b/.github/workflows/blockifier_ci.yml index 3cf49f006f7..3ed1ae0c0c6 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 e2eed9636fd..0eec90ab4e6 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: @@ -41,4 +44,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 1da1cdbbf24..b431c991d79 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 404ed096809..20a5e759c6b 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