Skip to content
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

CI: Only build templates that had changes #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

endersonmaia
Copy link
Contributor

@endersonmaia endersonmaia commented Sep 11, 2024

This PR will enable a selective build for templates.

For a Pull Request, only the templates that had some change will have their builds triggered.

If one job fail the other in the matrix will still run.

When the PR hits main, all templates will be built.

@endersonmaia endersonmaia force-pushed the ci/selective-matrix-build branch from 3b6b40e to a2ead08 Compare September 11, 2024 18:05
@endersonmaia endersonmaia requested a review from tuler September 11, 2024 18:06
@endersonmaia endersonmaia self-assigned this Sep 11, 2024
go/Dockerfile Show resolved Hide resolved
lua/Dockerfile Show resolved Hide resolved
go/Dockerfile Show resolved Hide resolved
cartesi hash
working-directory: ${{ matrix.allTemplates }}

build-on-pr:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having different jobs for main and PR why don't you just manipulate the matrix based on that, and use the same job?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I create two variables to be used as matrix, I could think of how to use both in a single job.

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.

2 participants