Skip to content

New workflow for releases#2933

Merged
daljit46 merged 3 commits intomasterfrom
releases
Jul 10, 2024
Merged

New workflow for releases#2933
daljit46 merged 3 commits intomasterfrom
releases

Conversation

@daljit46
Copy link
Member

This PR succeeds the work done in #2835. As mentioned there, instead of having a separate workflow for weekly releases, it's better to have a single CI workflow that manages both tagged and periodic releases.
As a first step towards that, this PR introduces a new CI workflow which creates artefacts of release builds using GitHub Actions. The artefacts are named as mrtrix3-{os}-{branch}.{extension} (@MRtrix3/mrtrix3-devs let me know if we want to add further information like build dates).
The workflow can be triggered manually, and the developer can specify the branch of MRtrix3 they want to build (the branch will need to be based on cmake).
This will be useful firstly because it allows a developer to create a release for a particular feature branch of their choice. Secondly, it will allow us to test our build scripts for our upcoming releases without creating a tagged release.

Since GitHub only allows workflow_dispatch triggers if the workflow file is on the default branch, the merge needs to be against master. This is slightly unfortunate since master is still not on cmake.
To make sure things behave as expected, I have already tested that the workflow succeeds on a separate fork of MRtrix3.

@daljit46 daljit46 marked this pull request as draft June 25, 2024 14:04
@Lestropie
Copy link
Member

I would have thought that for anything that is not based on an immutable tag, you would want the build date (yyyymmdd) embedded in the file name.

@daljit46
Copy link
Member Author

I would have thought that for anything that is not based on an immutable tag, you would want the build date (yyyymmdd) embedded in the file name.

Ok, will make changes to address this. Would a commit hash be even more preferable?

@Lestropie
Copy link
Member

Would a commit hash be even more preferable?

I think that if a user requires a version with greater specificity than a branch name and date to the nearest week, they're probably capable of compilation from source. I'd be content with naming by date rather than commit since it's intended for interpretation by users, though also wouldn't be against having both.

Maybe another case worth considering here is where a developer has made some change to a branch, and then wants to make that code version immediately available to a user to utilise / test. There, telling the user that they have to wait up to a week for GitHub to build and package it is a bit clumsy. Will developers be able to trigger regeneration of the package for a specific branch on demand?

@jdtournier
Copy link
Member

I'd favour both commit & date in the filename, personally.

Will developers be able to trigger regeneration of the package for a specific branch on demand?

Yes, I think that's the idea - @daljit46 can correct me if I'm wrong here...

@daljit46
Copy link
Member Author

daljit46 commented Jun 27, 2024

Yes, that's correct. In fact, this PR only implements manually triggered releases which don't create a tagged release, but GA artefacts that can be downloaded by anyone who has a GitHub account.

This CI workflow creates artifacts of release build using Github Actions.
The workflow can be triggered manually and the developer can specify the branch
of MRtrix3 they want to build.
@daljit46
Copy link
Member Author

daljit46 commented Jun 27, 2024

I've changed the workflow to produce artefacts as mrtrix3-${commit_sha}-${date}.${extension}. An example run can be seen here (it'd be great if you could test these by downloading and running them locally).

This is ready for review.

@daljit46 daljit46 marked this pull request as ready for review June 27, 2024 13:54
@daljit46 daljit46 requested a review from a team June 27, 2024 13:54
@daljit46 daljit46 marked this pull request as draft June 27, 2024 13:55
@daljit46
Copy link
Member Author

daljit46 commented Jun 27, 2024

Actually, just realised that there is a mistake in the Windows artefacts. Let me check that.
EDIT: never mind, false alarm. The Windows artefact commit is different because the cloning of source doesn't happen on the fork. But just in case, I will clone using the standard GitHub Action.

@daljit46 daljit46 marked this pull request as ready for review June 27, 2024 14:03
@daljit46
Copy link
Member Author

Another little thing I noticed is that Github by default packages artefact using .zip as an extension. Should I remove the extensions from the artefacts name?

@daljit46 daljit46 self-assigned this Jul 2, 2024
@daljit46 daljit46 enabled auto-merge July 10, 2024 09:32
@daljit46 daljit46 added this pull request to the merge queue Jul 10, 2024
Merged via the queue into master with commit 69ee9cc Jul 10, 2024
@daljit46 daljit46 deleted the releases branch July 10, 2024 15:19
@Lestropie Lestropie mentioned this pull request Jan 14, 2025
31 tasks
@Lestropie Lestropie mentioned this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants