AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
59 stars 23 forks source link

Make install scripts more robust #399

Closed spco closed 1 year ago

spco commented 5 years ago

Specifically, make them fail loudly, rather than silently as they do now - that helps with debugging, especially on Travis.

rs028 commented 1 year ago

@spco, can you elaborate a little, what did you have in mind when you opened this issue? I may be able to look into that.

spco commented 1 year ago

As it stands, some of the scripts do error-catching, and some don't. Normally this is in the form

if [ $? -ne 0 ] ; then
  echo "some error or other"
  exit 1
fi

For example, in install_openlibm.sh, some parts are guarded with that clause, but the final make -j command is not. So if the make -j clause fails, the script carries on and still does exit 0 (which means success). This can make debugging hard, particularly on GitHub Actions, because the stage looks like it's succeeded but has in fact failed, requiring you to dig directly into the logs to find the problem.

So I propose guarding each step in this way in each script. Currently it's somewhat inconsistent.

rs028 commented 1 year ago

Okay I understand. I will have a go. Thanks!

rs028 commented 1 year ago

This should be now solved by PR #496