Don't run tests with cpanm installs for the image#196
Don't run tests with cpanm installs for the image#196waterkip wants to merge 3 commits intoPerl:masterfrom
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 <waterkip@cpan.org>
generate.pl
Outdated
| {{docker_copy_perl_patch}} | ||
| WORKDIR /usr/src/perl | ||
|
|
||
| ARG TARGETARCH |
There was a problem hiding this comment.
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.
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 <waterkip@cpan.org>
Signed-off-by: Wesley Schwengle <waterkip@cpan.org>
b85018d to
25f8602
Compare
zakame
left a comment
There was a problem hiding this comment.
Looking good, just a few more tweaks! 👍
| && ./Configure -Darchname="$gnuArch" "$archFlag" {{args}} {{extra_flags}} -des \ | ||
| && make -j$(nproc) \ | ||
| && {{test}} \ | ||
| && { [ "$(dpkg --print-architecture)" = 'riscv64' ] || {{test}}; } \ |
There was a problem hiding this comment.
I guess we can now disregard this per #195 (comment)
| && {{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.
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.
There was a problem hiding this comment.
We can do that. I think perhaps also a BUILDARG for running everything with without tests? Instead of the dpkg --print-architecture we have in the diff as well?
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