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

Implement automated builds to edge #20

Closed
popey opened this issue May 10, 2018 · 4 comments
Closed

Implement automated builds to edge #20

popey opened this issue May 10, 2018 · 4 comments

Comments

@popey
Copy link
Contributor

popey commented May 10, 2018

It would be super if the gimp snap built from tip of master to the edge channel. Perhaps using the same override-build stanzas and version-script sections we've implemented in other snapcrafters builds? Would be a great way for people to help test the latest crack of the day!

@Ads20000
Copy link
Member

Perhaps using the same override-build stanzas and version-script sections we've implemented in other snapcrafters builds?

I haven't seen those before? Could you link to them? :)

@popey
Copy link
Contributor Author

popey commented May 21, 2018

Sure. Take a look at OBS. When the build runs it does some work L38-49 to figure out if the upstream project has tagged a release which is higher than the one in the beta channel. If there is then we git checkout that tag, rather than build the tip of master. Once that builds it goes into the edge channel. Someone needs to spot that (we have a bot in the morning which tells us in our team slack channel) there is a new version. It needs testing and either fixing or pushing to beta, with some more testing, or pushing right to stable (and beta).

With this we can force a new version to build by simply closing the beta channel "snapcraft close obs-studio beta". This will cause the check in line 43 to think there's a new version release, when there isn't, it's just that the beta channel is empty. So it triggers a rebuild of the stable release - which is handy if we get a security update in a dependency.

The bit right at the bottom from lines 154 onwards help enforce it to only build on i386, amd64 and arm64, because the library in question doesn't exist on armhf.

Some others like mattermost-desktop are interesting too. They have sections which forcibly fail the build (lines 23-24) when run on machines for which there is no upstream build. Clearly we would like to build from source here, but we don't, we consume the upstream debs, which is fine. The upstream in this case only makes i386 and amd64 debs, but build.snapcraft.io will run on all four architectures. So to force build to fail on armhf and arm64 we do that check. That way we don't get broken builds in the snap store.

It's a bit clunky, and is a workaround for a missing feature in snapcraft / build / launchpad (which is coming) which would enable us to say "only build on arch a and b" rather than "fail on build c and d".

Hope that makes sense.

@popey
Copy link
Contributor Author

popey commented Nov 3, 2020

@diddledan Is there some reason we can't build from tip of git to edge? Might be useful to detect build breakages before upstream stable releases.

@jnsgruk
Copy link
Member

jnsgruk commented Jan 6, 2025

Fixed with the snapcrafters CI implementation! :)

@jnsgruk jnsgruk closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants