-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
CI: add source_build job #7475
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: add source_build job #7475
Conversation
|
sidenote: the action i linked above as a "proof of test" is obviously on my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems overly complicated to me - I'm fine with running this as a separate job for the reasons you mentioned, but the whole business of manipulating files and appending submodules to the tar archive seems unnecessary to me.
Just run git ls-files --recurse-submodules | tar caf ../obs-studio.tar.gz -T- in the checkout directory and don't mind the .gitignore files that might be left over - IMO they belong to our source tree.
From what I could tell that single command gives us all the files from all submodules, except if I missed something?
You also forgot to add the artefact to the release creation job - we'd also want to add the tarball to our releases as well then.
how so?
the thing is: our needs are different from yours. we do want to see any build artifacts that is left around. you might of course argue that we could simply remove the repository configuration that we don't like on our side, but in general we want to change the upstream sources as little as possible, and as i don't see any reason to do include the repo-config in an explicitly non-repo artifact, i ask you to just remove it. if the source tarballs had already been useable as such, i would have submitted a patch to drop any repository configuration anyway. |
|
Fine by me, still |
your command is of course much simpler and more elegant than mine. |
That’s weird - the Git glob expression should take care of that, might need some tweaking. |
|
If you're not using an ancient tar version, you could also use the |
c0d81c4 to
a22e37d
Compare
|
so i force pushed a change using the suggestion by @Polynomial-C the code has become significantly simpler, basically running
a test-run of the job can be found at https://github.com/umlaeute/obs-studio/actions/runs/3410965320/jobs/5674593971 |
|
Nicely done, looks neat now. I will take a closer look tomorrow but looks fine at a first glance. |
|
ping @PatTheMav |
|
ping... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me - @tytan652 any objections to merge this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running this all the time is my biggest complain, creating useless artifacts except when we need one for a release/tag.
Edit: But there is no alternative, if I understood correctly.
Add a new job to the BUILD workflow, that generates a tarball with all the submodules (as GitHub's "Source Download" will happily exclude all the submodules, resulting in an incomplete tarball that fails to build). The generated tarball excludes all repository configuration files (everything starting with .git*, as to not interfere with downstream consumers of the tarball, who might have their own ideas how to configure a repository). Closes: obsproject#7407
a22e37d to
e2dfec3
Compare
afaict, the current pipelines will generate the following artifacts on each push:
the source-job adds another artifact with a size of approximately 32MB. But anyhow: I see that e.g. the obs-studio/.github/workflows/main.yml Line 419 in 5b370d4
if you want I can add this condition (but that means that the pipeline won't be run before you merge, which imho is even less desirable; but ymmv, so just tell me if you require me to do so). |
|
@tytan652 how does this sound? |
I let @PatTheMav having the final say.
What I talked about was a piece of the problem. The main problem was discussed off-thread. |
ah i see. sorry for being snarky then. |
It was between OBS developers, so no.
So do not worry about any of that. |
any news on this? |
|
@tytan652 @PatTheMav ping |
|
ping @tytan652 @PatTheMav |
|
ping @tytan652 @PatTheMav |
|
This is already partially implemented in the updated workflows, but will be enabled once Ubuntu-based builds use the updated CMake path sometime after the next release (similar to how it's already implemented in the plugintemplate). As this was based on the old workflows and is not compatible with the updated CI system, I'll close this PR. But the feature will definitely be implemented. |
Description
This adds a new job to the BUILD workflow, that generates a tarball with all the submodules (as GitHub's "Source Download" will happily exclude all the submodules, resulting in an incomplete tarball that fails to build).
The generated tarball excludes all repository configuration files (everything starting with .git*),
in order to not interfere with downstream consumers of the tarball, who might have their own ideas how to configure a repository.
@PatTheMav suggested in #7407 (comment) that i should extend the
build_linuxjob, which I did not do for the following reasons:tar.gzas the output format)Motivation and Context
This is motivated by creating the Debian-official packages of obs-studio ("Debian-official" being the packages that are shipped by Debian itself (and thus by derivatives like Ubuntu), as opposed to .deb-packages shipped by obs-studio itself).
On Debian, we use release tarballs for creating our packages, and as such it is important that these packages contain all the necessary bits and bolts.
Closes: #7407
How Has This Been Tested?
This has been tested by running the workflow in my fork of OBS-studio.
https://github.com/umlaeute/obs-studio/actions/runs/3135647019
For whatever reasons, all the other build-jobs fail with some Cmake specific error. Since I did not touch these jobs, I think the problem is somewhere else (e.g. hidden in the project settings).
Types of changes
?
Checklist: