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

Speed up glibc leg of CI #1011

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/wolfi-presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ jobs:
make SHELL="/bin/bash" MELANGE="sudo melange" package/${{ matrix.package }}

- run: |
for f in packages/x86_64/${{ matrix.package }}-*.apk; do
docker run --rm -v $(pwd):/work cgr.dev/chainguard/wolfi-base apk add --allow-untrusted /work/$f
done
# glibc has tons of subpackages such that fetching the APKINDEX over and over again adds almost 3 minutes to CI time.
# To mitigate this, instead of running a separate docker container for each package, we do them all in one script.
# However, because we no longer have an isolated container for each run, we use the --simulate flag to avoid conflicts.
# This means we miss out on some coverage for glibc (e.g. actually installing the packages), but that's too slow.
if [ "${{ matrix.package }}" = "glibc" ]; then
echo "#!/bin/sh" >> entrypoint.sh
for f in packages/x86_64/${{ matrix.package }}-*.apk; do
echo "apk add --simulate --allow-untrusted /work/$f" >> entrypoint.sh
done

chmod +x entrypoint.sh
docker run --rm -v $(pwd):/work cgr.dev/chainguard/wolfi-base /work/entrypoint.sh
else
for f in packages/x86_64/${{ matrix.package }}-*.apk; do
docker run --rm -v $(pwd):/work cgr.dev/chainguard/wolfi-base apk add --allow-untrusted /work/$f
done
fi
Loading