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

Github Actions: Arch #1614

Closed
Narrat opened this issue Mar 12, 2024 · 2 comments
Closed

Github Actions: Arch #1614

Narrat opened this issue Mar 12, 2024 · 2 comments

Comments

@Narrat
Copy link
Contributor

Narrat commented Mar 12, 2024

Noticed that the Arch builds take rather long compared to the others and had a look at the build.yml.
I'm not familiar with the process of setting CI containers up. Are those docker images in use?
If so, then

pacman-key --init
could be adjusted to

pacman-key --refresh-keys

as the key infrastructure already should be correctly set up .
It could be the cause for the extra time, as creating a gpg keypair could take some time, especially on a headless system. And it would be unnecessary CPU time, as there is no gain in a new and fresh key for the local system/container.
And if there is really no key, then the build.yml would likely be missing a call to pacman-key --populate

@Consolatis
Copy link
Member

Consolatis commented Mar 14, 2024

My memory is a bit fuzzy regarding this but AFAIR it was required to call --init because the keyring in the image used wasn't working otherwise. Regarding the runtime, Arch, Debian and Void have a runtime of about 1 to 2 minutes compared to the FreeBSD VM with 3 to 4 minutes so shaving of a few seconds from Arch isn't really worth it.

Currently there is another issue with Arch in that the mirror used sometimes fails deliver content and basically idles with some kb/s (or even bytes/s). We had similar issues in the past with other distros so I assume it is a temporary problem and will fix itself over time.

@Narrat
Copy link
Contributor Author

Narrat commented Mar 14, 2024

Odd, but maybe I didn't compare it with enough runs. I particulary noticed https://github.com/labwc/labwc/actions/runs/8254909096/usage and with a quick glance the runs around Arch were the slowest.
And then I noticed the --init call, which can take some time. Couldn't see any numbers that were indicating what exactly took the time and assumed the keygen. So if you say there are also mirror problems that seems to be more likely if you can say from experience, that the running times were lower. Cemented by newer runs/figures that definitively take less time.
Nevertheless, the call to --init should be superfluous, as the image adds and intializes the stuff. And after taking a quick look at pacman-key running --init on the populated dir shouldn't do a thing.

Regarding mirrors: To avoid issues with mirrors the following could be added in whatever way:

pacman -Sy
pacman -S pacman-contrib
curl -s "https://archlinux.org/mirrorlist/?country=US&country=DE&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > /etc/pacman.d/mirrorlist
pacman -Syyu --noconfirm
(...)

or alternatively

pacman -Sy
pacman -S reflector
reflector --latest 5 --protocol https --sort rate --country 'USA,Germany,' --save /etc/pacman.d/mirrorlist
pacman -Syyu --noconfirm
(...)

With reflector being the faster solution in my experience.

@Narrat Narrat closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants