Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

parallel builds #81

Merged
merged 4 commits into from
May 12, 2022
Merged

parallel builds #81

merged 4 commits into from
May 12, 2022

Conversation

matti
Copy link
Contributor

@matti matti commented Apr 24, 2022

Building all packages takes looooong time. This PR adds /build.sh which:

  • builds pkg-builder
  • builds all packages in parallel with /dev/kvm mounted so that tests can pass
  • redirects build outputs to /tmp for later review in case of failures
  • provides a summary of packages which failed to build and which succeeded
  • outputs time spend per package in seconds
  • runs build_repo.sh if all parallel builds are successful

sample output:

$ ./build.sh
...
redirecting output to /tmp/intel-mvp-spr-qemu-kvm.log
redirecting output to /tmp/intel-mvp-tdx-libvirt.log
redirecting output to /tmp/intel-mvp-spr-kernel.log
redirecting output to /tmp/intel-mvp-tdx-tdvf.log
redirecting output to /tmp/intel-mvp-tdx-guest-grub2.log
redirecting output to /tmp/intel-mvp-tdx-guest-shim.log

intel-mvp-tdx-guest-shim build completed in 122s
intel-mvp-tdx-libvirt build completed in 252s
intel-mvp-tdx-guest-grub2 build completed in 307s
intel-mvp-tdx-tdvf build completed in 386s
intel-mvp-spr-qemu-kvm build completed in 657s
intel-mvp-spr-kernel build completed in 1299s

intel-mvp-tdx-guest-grub2 logs in /tmp/intel-mvp-tdx-guest-grub2.log: ok
intel-mvp-tdx-libvirt logs in /tmp/intel-mvp-tdx-libvirt.log: ok
intel-mvp-spr-qemu-kvm logs in /tmp/intel-mvp-spr-qemu-kvm.log: ok
intel-mvp-tdx-tdvf logs in /tmp/intel-mvp-tdx-tdvf.log: ok
intel-mvp-spr-kernel logs in /tmp/intel-mvp-spr-kernel.log: ok
intel-mvp-tdx-guest-shim logs in /tmp/intel-mvp-tdx-guest-shim.log: ok

OK

the above times (total time 1299s, ~21mins) are with Ryzen 5950x (16c/32t), 64gb ram, NVMe - without this parallel optimization it takes forever.

I tried to make this so that it doesn't break the existing scripts, it just extends them. I didn't address rhel because it doesn't have pkg-builder and I'm not sure what's the current status of the target distros.

Let me know what you think.

@matti
Copy link
Contributor Author

matti commented Apr 24, 2022

Oh, and also adds some paths to .gitignore so that git is clean after build

This was referenced Apr 24, 2022
@jialeif
Copy link
Contributor

jialeif commented Apr 25, 2022

@matti rhel pkg-builder was removed by 54577dd
It built with redhat official docker image registry.access.redhat.com/ubi8/ubi:8.5 which cannot satisfy the build dependencies.
As redhat repos are commercial, we cannot provide additional repos in public.

@matti
Copy link
Contributor Author

matti commented Apr 25, 2022

@jialeif ok - just fixed shellcheck warnings. I tried to make this without docker-compose, but it's much more difficult because docker run ignores control+c (INT) and docker-compose does not, so when backgrounding and aborting the build it's just convenient.

@matti
Copy link
Contributor Author

matti commented Apr 25, 2022

also added build_repo.sh at the end so that it generates those 1.6gb of RPMs

@kenplusplus kenplusplus merged commit 7602b46 into intel:main May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants