snapcrafters / gimp

Unofficial GNU Image Manipulation Program (GIMP) installer for Linux
https://snapcraft.io/gimp
MIT License
51 stars 25 forks source link

Fix `preview` branch build and enable automation #255

Closed jnsgruk closed 4 months ago

jnsgruk commented 5 months ago

This PR adds new automation to the preview branch. It depends on https://github.com/snapcrafters/ci/pull/28, and should not be merged before that PR.

These files are very similar to those on the candidate branch, but specify a different channel.

@merlijn-sebrechts before this can be merged, we need to create an environment named "Preview Candidate Branch" which has all the necessary secrets in it, noting the name of ${{ secrets.SNAP_STORE_PREVIEW_STABLE }}.

Let me know what you think!

**Edit***: This grew arms and legs - it turns out the preview build was actually quite broken, and took some significant wrangling to get it to build and launch on Ubuntu. I've tried to break down into small commits where possible, but let me know if there is any further context required!

Closes #244 Fixes #126 Fixes #219

jnsgruk commented 5 months ago

Oh I didn't realise the build was broken, I'll take a look at that soon. The other option is to merge these relatively trivial changes, and we can address the build issues in another PR?

merlijn-sebrechts commented 5 months ago

I'd like you to fix the build first, either in this PR or in a separate one, so we can immediately test everything after merging.

jnsgruk commented 5 months ago

Latest commit grabs the changes from #202 and integrates them here.

jnsgruk commented 5 months ago

This last commit builds fine on my box.

I also noticed that gmic is missing here - I'm 95% through porting that for core22 / gimp 2.99 but not quite finished - will leave on a separate branch unless I finish before this merges :)

jnsgruk commented 5 months ago

@merlijn-sebrechts this is now actually "working", but the job takes too long and is killed by Github Actions (we can't make it timeout after a longer time without paying).

Are you happy to merge this? I'll need to have a think about what we can do for the PR flow in the case that the build takes ages!

What I can't work out is why the build on candidate can apparently build inside Github Actions in 42 minutes, and this timed out at six hours. I think something is stalling but I can't work out what,

jnsgruk commented 5 months ago

Latest commit tested with remote-build - resulting snap enabled this screenshot to happen :)

image

jnsgruk commented 5 months ago

This is now good to go from my side -- both architectures build fine on Launchpad as of today!

jnsgruk commented 4 months ago

@merlijn-sebrechts success! We have a green CI run for the pull request flow! (see here).

I've removed the commit that enabled it to trigger, because I had to loosen the branch constraint on the pull request flow, but I think I can fix that in a later request when we try to converge the two branches?