-
Notifications
You must be signed in to change notification settings - Fork 52
Don't run tests with cpanm installs for the image #196
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
base: master
Are you sure you want to change the base?
Conversation
cpanm runs tests for everything it installs, which might be a good thing or a bad thing. It depends mostly on flavor. cpm will install modules without running tests by default for example. This commits still uses cpanm, but with the --notest flag so we can improve on our build times. Closes: Perl#195 Signed-off-by: Wesley Schwengle <[email protected]>
generate.pl
Outdated
@@ -319,6 +319,8 @@ =head1 DESCRIPTION | |||
{{docker_copy_perl_patch}} | |||
WORKDIR /usr/src/perl | |||
|
|||
ARG TARGETARCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately we don't officially support or recommend relying on TARGETARCH
-- I would suggest using dpkg --print-architecture
and/or apk --print-arch
instead (I don't think we've got any Alpine here, but just in case / for completeness).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ok. I'll change it
8a3a8ad
to
b85018d
Compare
I tried to rely on TARGETARCH, but unfortunatly Docker doesn't officially supports or recommends using it. If we ever need alpine support: apk --print-arch The testsuite takes to long on the single riscv64 for all trixie builds. Context: > Unfortunately, our singular riscv64 build server in Docker Official > Images is unable to complete any of the perl image builds. We have a > 3-hour time limit on all builds (to ensure things don't get stuck and > prevent resource monopolization) and none of them are able to complete > in that time. Is there anything that could be skipped or changed on > riscv64 builds to help them complete faster? https://doi-janky.infosiftr.net/job/meta/job/riscv64/job/build/13644/pipeline-overview/ Closes: Perl#195 Signed-off-by: Wesley Schwengle <[email protected]>
Signed-off-by: Wesley Schwengle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 👍
b85018d
to
25f8602
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just a few more tweaks! 👍
@@ -330,15 +330,15 @@ =head1 DESCRIPTION | |||
&& archFlag="$([ "$archBits" = '64' ] && echo '-Duse64bitall' || echo '-Duse64bitint')" \ | |||
&& ./Configure -Darchname="$gnuArch" "$archFlag" {{args}} {{extra_flags}} -des \ | |||
&& make -j$(nproc) \ | |||
&& {{test}} \ | |||
&& { [ "$(dpkg --print-architecture)" = 'riscv64' ] || {{test}}; } \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can now disregard this per #195 (comment)
&& make install \ | ||
&& cd /usr/src \ | ||
&& curl -fLO {{cpanm_dist_url}} \ | ||
&& echo '{{cpanm_dist_sha256}} *{{cpanm_dist_name}}.tar.gz' | sha256sum --strict --check - \ | ||
&& tar -xzf {{cpanm_dist_name}}.tar.gz && cd {{cpanm_dist_name}} \ | ||
&& {{cpanm_dist_patch_https}} \ | ||
&& {{cpanm_dist_patch_nolwp}} \ | ||
&& perl bin/cpanm . && cd /root \ | ||
&& perl bin/cpanm --notest . && cd /root \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can take this as an ARG
with a default --notest
so we can pass `` later in GHA builds here and below at lines 344 & 347? That way official-image builds can proceed faster while we can affirm tests on our own CI here.
cpanm runs tests for everything it installs, which might be a good thing or a bad thing. It depends mostly on flavor. cpm will install modules without running tests by default for example. This commits still uses cpanm, but with the --notest flag so we can improve on our build times.
Closes: #195