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

Add GitHub actions #61

Merged
merged 23 commits into from
Nov 15, 2024
Merged

Add GitHub actions #61

merged 23 commits into from
Nov 15, 2024

Conversation

ll-nick
Copy link
Collaborator

@ll-nick ll-nick commented Oct 25, 2024

See #59 for details.

This adds automated workflows to

  • build and run unit tests of both the core library and the demo on any push to any branch
  • on merge to main:
    • bump the version in the version file according to the version string in the commit messages (#major, #minor, #patch, #none). #minor by default.
    • create a new release and add debian packages as well as tar.gz and zip release
    • run the unit tests against the released packages
    • build and push new docker images for the core library, the demo and the tutorial

Dockerfile Outdated

# Run unit tests
CMD ["cmake", "--build", "/tmp/arbitration_graphs/build", "--target", "test"]
Copy link
Member

Choose a reason for hiding this comment

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

👌

@ll-nick ll-nick force-pushed the github_actions branch 9 times, most recently from 6127504 to d8e9b4f Compare November 12, 2024 11:46
@ll-nick ll-nick changed the base branch from main to packaging_with_cpack November 12, 2024 11:46
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 12, 2024

Changed the base to packaging_with_cpack since we need those changes for the release pipeline.

@ll-nick ll-nick marked this pull request as ready for review November 12, 2024 12:54
@ll-nick ll-nick requested review from orzechow and removed request for ChristophBurger89 November 12, 2024 12:55
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 12, 2024

Alright @orzechow , this one is ready for review. It should be very analogous to the util_caching pipelines now. Feel free to push your release-test-pipeline onto this branch if we want to do that in one go.

@orzechow
Copy link
Member

Alright @orzechow , this one is ready for review. It should be very analogous to the util_caching pipelines now. Feel free to push your release-test-pipeline onto this branch if we want to do that in one go.

Thanks!

One quick remark: the dockerfile is missing the release_builder stage etc.

Yeah, I'll add the release test pipeline after finishing the cpack PR

@ll-nick ll-nick marked this pull request as draft November 13, 2024 07:11
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 13, 2024

You're right. I think it's easier if one person just does it. I have moved the PR back to draft to wait until you finished the cpack PR.

I will then rebase this PR, add the Docker stage and release test pipeline and ping you once the PR is actually done.

@orzechow orzechow force-pushed the packaging_with_cpack branch from fa3fbc6 to c0eb7ba Compare November 13, 2024 11:02
Base automatically changed from packaging_with_cpack to main November 13, 2024 15:20
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 14, 2024

Rebased on main

The ghcr version of the image might not represent the current state of
the library and possibly does not even exist for the version of a dev
branch.
@ll-nick ll-nick marked this pull request as ready for review November 14, 2024 13:01
@ll-nick
Copy link
Collaborator Author

ll-nick commented Nov 14, 2024

Ok @orzechow this one should truly be ready now.

See the edited PR description for all the things that are now going on the workflows.

I tested the workflow on a test branch where I didn't need a PR to trigger the workflow, see 82b31a0. Other than that, the branch is identical to this one and the last run was succesful.

A couple of noteworthy changes I made since we last talked about this:

  • Combine the release and the docker build workflows. This is due to the fact that we need the version bump to happen first. Otherwise the docker images will be tagged with the old version. Also I guess it's nice to wait for the release tests before publishing new images.
  • The unit-test workflow now build the library core image before building the demo unit test stage. This is due to the fact that we want to test the state that the repo is in. Otherwise, the demo unit tests would run against the version that's currently hosted on ghcr (which doesn't even necessarily exist).

Before merging, I'll delete the tag, release and docker images created by the test branch. I will then merge this as a #minor release.

Copy link
Member

@orzechow orzechow left a comment

Choose a reason for hiding this comment

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

Great! Thanks for the good work 🫶

Release deb & tar.gz look good 👌
Couldn't test the ghcr.io docker images (bad connectivity), but I trust that you did.

Let's go 🚀

@ll-nick ll-nick merged commit 5b1a733 into main Nov 15, 2024
1 check passed
@ll-nick ll-nick deleted the github_actions branch November 15, 2024 06:45
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