Skip to content

Conversation

@plamentotev
Copy link
Member

Testing with the latest version of version requires regular update to all Plexus repositories' GitHub Actions workflows. This is a repetitive, time consuming task.

Given that the build workflow for the various Plexus project is almost the same, we can re-use common workflow. Then using the latest version of Java is just a matter of changing the build matrix in single file.

This proposal makes use of the new reusable workflows feature - https://docs.github.com/en/actions/learn-github-actions/reusing-workflows. What do you think? Also what about the default maven args - is this sensible default?

@plamentotev
Copy link
Member Author

Also there is one more benefit I forgot to mention - this way we can update the Actions in single place instead of managing them in each repository. Of course this will work only if we reference the main branch and not specific tag, but I don't think this would be an issue.

@plamentotev
Copy link
Member Author

And one more think. I haven't used shared workflows yet, but I suspect when the shared workflow is changed that would not retrigger the workflows that use it. So we should think of another way to trigger them. Maybe running on schedule?

- name: Checkout
uses: actions/checkout@v2

- name: Set up cache for ~./m2/repository
Copy link
Member

Choose a reason for hiding this comment

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

setup-java now have a cache (https://github.com/actions/setup-java#caching-maven-dependencies) maybe we can this step now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I also noticed that I've left 17-ea. 17 is released now.

@plamentotev plamentotev force-pushed the use-common-build-workflow branch from c8261e5 to b6394c5 Compare October 13, 2021 17:03
Testing with the latest version of version requires regular update to all Plexus repositories'
GitHub Actions workflows. This is a repetitive, time consuming task.

Given that the build workflow for the various Plexus project is almost the same,
we can re-use common workflow. Then using the latest version of Java is just a matter
of changing the build matrix in single file.
@plamentotev plamentotev force-pushed the use-common-build-workflow branch from b6394c5 to 6967bdd Compare October 13, 2021 17:05
@plamentotev plamentotev requested a review from olamy October 14, 2021 17:00
@olamy
Copy link
Member

olamy commented Oct 15, 2021

And one more think. I haven't used shared workflows yet, but I suspect when the shared workflow is changed that would not retrigger the workflows that use it. So we should think of another way to trigger them. Maybe running on schedule?

we can tag it and use the tag in components gh actions. so you can simply use only one project in a branch to test main.
if we use tag then dependabot will propose the upgrade

@olamy
Copy link
Member

olamy commented Oct 15, 2021

in wonder if we could use a strategy similar to this one https://github.com/apache/maven-gh-actions-shared
maybe with more default jdk distribution?

@olamy olamy added the enhancement New feature or request label Oct 15, 2021
@olamy olamy merged commit c6a1de6 into master Oct 15, 2021
@olamy olamy deleted the use-common-build-workflow branch October 15, 2021 03:05
@olamy
Copy link
Member

olamy commented Oct 15, 2021

all set. I even cut a release and look how I configured plexus-utils with tag

@plamentotev
Copy link
Member Author

plamentotev commented Oct 17, 2021

we can tag it and use the tag in components gh actions. so you can simply use only one project in a branch to test main. if we use tag then dependabot will propose the upgrade

Sounds great.

in wonder if we could use a strategy similar to this one https://github.com/apache/maven-gh-actions-shared maybe with more default jdk distribution?

I didn't knew about this project. Looks interesting. You mean that we could use more flexible os/jdk matrix?

Edit: I saw that you already added those enhancements to the workflow. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants