Skip to content

Comments

Speed up CI: run static analysis in parallel with Docker builds#271

Open
vojtabiberle wants to merge 1 commit intomainfrom
vb/ci_speedup
Open

Speed up CI: run static analysis in parallel with Docker builds#271
vojtabiberle wants to merge 1 commit intomainfrom
vb/ci_speedup

Conversation

@vojtabiberle
Copy link
Contributor

Summary

  • Split build job into lightweight paths_filter (~15s) + Docker-only build (~5min), enabling static analysis to start immediately
  • Add native static analysis workflow (static-analysis.yml) that runs phplint/phpcs/phpstan via shivammathur/setup-php without Docker, in parallel with the Docker image build
  • Eliminate redundant Docker build in build-php-storage-driver-common.yml by merging the protoc job into build_common_driver (dev image is a cache hit)
  • Add ci-tests composer script to all 5 packages (validate + tests only), used by Docker-based workflows now that static analysis runs separately
  • Add phplint to php-storage-driver-snowflake (was the only package missing it)

New pipeline flow

paths_filter (~15 sec)
  ├── static_analysis (~1-2 min, native PHP, no Docker)
  └── build (Docker build + ECR push, ~5 min)
        ├── build_datatypes
        ├── build_php_table_backend_utils
        ├── build_php_db_import_export
        ├── build_php_storage_driver_common (single Docker build, protoc merged)
        └── build_php_storage_driver_snowflake
            └── test_results (gates on static_analysis + all package builds)

Test plan

  • Verify static_analysis job starts within seconds of push and finishes in ~1-2 min
  • Verify static_analysis runs in parallel with build (Docker image build)
  • Verify build_php_storage_driver_common only builds one Docker image (protoc uses cache hit)
  • Verify package workflows run ci-tests (no phplint/phpcs/phpstan in Docker logs)
  • Verify a fully-green PR still merges correctly (no regression)
  • Verify release tags still trigger monorepo_split correctly

🤖 Generated with Claude Code

Split the build job into a lightweight paths_filter job and a Docker-only
build job. Static analysis (phplint, phpcs, phpstan) now runs natively
via shivammathur/setup-php in parallel with the Docker image build,
eliminating the 5+ min Docker wait for lint/type errors.

- Add static-analysis.yml reusable workflow with native PHP setup
- Add ci-tests composer script to each package (validate + tests only)
- Switch package workflows from composer ci/check to ci-tests
- Merge redundant protoc Docker build into build_common_driver job
- Add phplint to php-storage-driver-snowflake package
- Gate test_results on static_analysis + all package builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant