-
Notifications
You must be signed in to change notification settings - Fork 5.1k
chore(ci): add main branch build validation and concurrency control #20226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add a new workflow to validate commits pushed to main and LTS branches: - Runs full build and tests on push to main, camel-4.4.x, camel-4.8.x, camel-4.10.x, and camel-4.14.x branches - Tests with both Java 17 and Java 21 - Includes build artifact archival for debugging Add concurrency control to PR workflows to prevent resource waste: - pr-build-main.yml: Cancel in-progress runs when PR is updated - pr-comment.yml: Cancel in-progress runs for same issue - pr-doc-validation.yml: Cancel in-progress runs when PR is updated - depsreview.yaml: Cancel in-progress runs when PR is updated This ensures the main branch is always validated after merges and reduces CI queue times by cancelling obsolete workflow runs.
squakez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor points you may want to consider.
.github/workflows/main-build.yml
Outdated
| push: | ||
| branches: | ||
| - main | ||
| - camel-4.4.x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd keep only last 2 LTS instead. Altough this is not really affecting as we don't merge anything to older branches, it could be perceived as an argument for users which expects longer timeline maintenance for those older branches.
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| java: ['17', '21'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the merge I'd reduce the quantity of resources by only checking against the latest JVM supported instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make more sense to keep the main build against all supported JVM and reduce the build in the PR to run only against the latest JVM rather than the opposite.
Removed camel-4.4.x and camel-4.8.x branches from the main branch build workflow to focus on only the two most recent LTS releases.
Add a new workflow to validate commits pushed to main and LTS branches:
main,camel-4.4.x,camel-4.8.x,camel-4.10.x, andcamel-4.14.xbranchesAdd concurrency control to PR workflows to prevent resource waste:
This ensures the main branch is always validated after merges and reduces CI queue times by cancelling obsolete workflow runs.