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

ci: Build image from Containerfile when tag changes #1334

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

swick
Copy link
Contributor

@swick swick commented Apr 11, 2024

This is based on work by @flexagoon (#1270) but changes how the build images are being build, has a few things renamed, fixes an issue with the artifact upload, and adds a check for POTFILES.in.

@swick
Copy link
Contributor Author

swick commented Apr 11, 2024

I think someone needs to create and adjust the permissions on the xdg-desktop-portal-build container package in the flatpak org.

edit: mh, it seems like we can't make the package free-for-all? In that case a project member has to run the workflow once when a MR bumps the tag/updates the container.

Can a project member try to figure out if this actually works?

/cc @GeorgesStavracas @smcv

@swick
Copy link
Contributor Author

swick commented Oct 4, 2024

Rebased. Can I convince anyone to take a look at this?

@GeorgesStavracas
Copy link
Member

Can I ask you to do some test releases on your repo, so we can see how it goes?

Otherwise this allocates some memory just to release it again.
The builder has no chance to infer the type of the array entries if
there are none so trying to construct empty arrays of type
G_VARIANT_TYPE_ARRAY is an error.

Specify the full type instead.
We fail CI when there are memory leaks but some of the existing leaks
are not trivial to track down. This introduces a suppression file for
asan which helps keep CI green while also clearly documenting leaks that
we're aware of.
@swick
Copy link
Contributor Author

swick commented Oct 8, 2024

There was a whole bunch of broken things and I spent most of the day on fixing and testing them. It now uses a single container for testing, docs and releases. Releases work (https://github.com/swick/xdg-desktop-portal/actions/runs/11239635794).

@swick
Copy link
Contributor Author

swick commented Oct 8, 2024

The only thing I can't really test is how the permissions work here. CI fails in this MR because it can't build images for the flatpak org. I guess that you just have to run them manually with your maintainer permissions. Can you try that?

# external (GIO?)
leak:g_dbus_message_new_from_blob
# Bugs in our code
# Take a look at them and try to figure out what's going on!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some are in libportal. For example https://github.com/flatpak/libportal/pull/170/files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought that might be possible. It's a bit futile to always have no leaks in all dependencies so I think the suppression here is useful either way.

Copy link
Member

@GeorgesStavracas GeorgesStavracas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments, LGTM otherwise

.github/workflows/container.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@swick
Copy link
Contributor Author

swick commented Oct 8, 2024

@GeorgesStavracas do you mind running the workflows to see if everything works?

@swick
Copy link
Contributor Author

swick commented Oct 8, 2024

As requested on matrix, this is now without the release workflow and POTFILES checks.

@swick swick changed the title ci: refactor ci, automate releases, check POTFILES.in ci: Build image from Containerfile when tag changes Oct 8, 2024
This moves all workflows to a unified image which is defined in a
Containerfile. The CI will create an image if one with the required tag
does not exist and re-uses existing images if they do exist already.

Co-authored-by: flexagoon <[email protected]>
@GeorgesStavracas GeorgesStavracas merged commit c092c56 into flatpak:main Oct 8, 2024
3 of 5 checks passed
@GeorgesStavracas GeorgesStavracas added this to the 1.20 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

3 participants