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

build with GH actions and Docker #680

Merged
merged 1 commit into from
Dec 24, 2023
Merged

build with GH actions and Docker #680

merged 1 commit into from
Dec 24, 2023

Conversation

mgmax
Copy link
Collaborator

@mgmax mgmax commented Jun 28, 2023

(updated)

Add GitHub actions in parallel to the old buildserver.

Currently implemented:

  • Trigger the old buildserver (unchanged) for every commit on master
  • Run build pipeline on GH actions for every commit and PR
  • Save output as build artifact (Note: artifacts are deleted after 90 days)

Not implemented:

  • Permanent archive / release creation

@TheAssassin
Copy link
Contributor

I am willing to help in polishing this. I have quite some experience with CI and especially GitHub actions.

Some thoughts:

Save output as build artifact (Note: artifacts are deleted after 90 days)

That's normal. It's also a regular build step. Binaries should be uploaded in a separate step in my opinion, especially when running multiple jobs in parallel (back in the times when GitHub actions did not exist and Travis CI was used by everyone, we ran into race conditions a lot due to the lack of an artifacts storage).

Beware that artifacts can be downloaded only when logged into GitHub for some reason.

Run build pipeline on GH actions for every push to master
Build other branches

Just delete the branch filter and the pipeline is going to be run on all branches automatically. You may need such a filter only for singular build steps if you want to implement some fancy auto releasing. But there are better solutions that do not require any such filtering (see below!).

For manual builds, there is the workflow_dispatch event which can accept parameters.

Build (without archiving) for pull requests

Why not test end-to-end? The builds shouldn't take that long anyway. You want to have CI changes be tested, too.

Permanent archive / release creation

Please see pyuploadtool, which automates uploading binaries to GitHub releases in an opinionated way (including features like filtering branches, i.e., uploading binaries only for releases, which means the tool can be run with every build, it will automatically skip uploads on feature branches).

You can see it in action for instance on AppImageUpdate's release page. There is a continuous release which is recreated for every new commit on main, and stable releases that are created automatically for tags.

I can implement this in my fork and send a PR to your branch.

@mgmax
Copy link
Collaborator Author

mgmax commented Jul 1, 2023 via email

- For all commits on master, use both GH Actions and the old buildserver (download.visicut.org).
- For all PRs, use GH Actions.

Limitation: Currently the output of GH Actions is only temporarily kept for 90 days. No release is created.
@mgmax
Copy link
Collaborator Author

mgmax commented Dec 22, 2023

I updated the PR content and description:

  • Do not remove the old build server trigger, but keep it in parallel
  • also build on PRs

I think the current result is a useful first step, so I would merge this sooner or later if there is no other feedback.

@mgmax mgmax marked this pull request as ready for review December 22, 2023 11:29
@TheAssassin
Copy link
Contributor

Totally forgot about this. Looks good to me as a first step. I'd like to have it merged before sending my own PR. I'll take your feedback into account. Approved by me (if that matters to you).

@TheAssassin
Copy link
Contributor

For the record, I just tagged a release on pyuploadtool. I still think master is a good target (obviously, I write that software and if it's broken we'd notice quickly enough) but occasional tags should help have some "known good" states. https://github.com/TheAssassin/pyuploadtool/releases/tag/20231223-1

@mgmax mgmax merged commit 7ec945a into t-oster:master Dec 24, 2023
1 check passed
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