PDLPorters / devops

2 stars 0 forks source link

CI does not appear to save the output of Makfile.PL in the job run logs #41

Open KJ7LNW opened 2 years ago

KJ7LNW commented 2 years ago

Maybe it does, but I couldn't find the output here:

https://github.com/PDLPorters/pdl-linearalgebra/runs/7588380931?check_suite_focus=true

Could something like this be added? I'm not sure where it would be placed:

perl Makefile.PL 2>&1 | tee makemaker.log
cat makemaker.log
mohawk2 commented 2 years ago

The problem here (as a reading of that log plus inferences about the CI config) is that cpanm will be running the Makefile.PL to get the deps, then this bit: https://github.com/PDLPorters/pdl-linearalgebra/runs/7588380931?check_suite_focus=true#step:6:306 which says:

    if [ -f Makefile.PL ]; then
      ( [ -f Makefile ] || $BUILD_RUNNER_PREFIX $MYPERL Makefile.PL )

and chooses not to rerun the file because the Makefile will already exist. @zmughal Would it cause problems to rerun the Makefile.PL (etc) even if it the generated file already exists?

KJ7LNW commented 2 years ago

If there is a log then we could cat the cpanm deps log after it pulls them down. Whatever makes the most sense...

zmughal commented 2 years ago

The log is already output if the cpanm command fails by using

|| cat ~/.cpanm/build.log

here https://github.com/PDLPorters/devops/blob/8c0ce761e18670900b1740e0a87e74310d43db20/github-actions/ci-dist/action.yml#L337

Is this for debugging purposes? Because if you need to debug, it is better to log in to the CI machine using https://github.com/mxschmitt/action-tmate.

mohawk2 commented 2 years ago

The idea is to debug the output of the Makefile.PL itself, hence my question. But I agree the action-tmate option is better.

zmughal commented 2 years ago

I think there can be an option to make the output verbose for that part. I want to keep the logs mostly quiet (except for the tests) if there are no CI problems.

mohawk2 commented 2 years ago

I like the idea of quiet logs and a quiet Makefile.PL, which is why PDL's Makefile.PL is now much less chatty than in the past. I would say that it's usually valuable to show Makefile.PL output, or at least shouldn't be a problem.