ci: print env to allow reproducing the job outside of CI #1147

pull jonasnick wants to merge 1 commits into bitcoin-core:master from jonasnick:print-cirrus-envs changing 1 files +20 −0
  1. jonasnick commented at 7:21 PM on November 2, 2022: contributor

    Example output:

    WERROR_CFLAGS="-Werror -pedantic-errors"  MAKEFLAGS="-j4"  BUILD="check"  ECMULTWINDOW="auto"  ECMULTGENPRECISION="auto"  ASM="no"  WIDEMUL="int64"  WITH_VALGRIND="no"  EXTRAFLAGS=""  EXPERIMENTAL="no"  ECDH="no"  RECOVERY="yes"  SCHNORRSIG="no"  SECP256K1_TEST_ITERS=""  BENCH="yes"  SECP256K1_BENCH_ITERS="2"  CTIMETEST="yes"  EXAMPLES="yes"  WRAPPER_CMD=""  CC="gcc"  AR=""  NM=""  HOST=""  ./ci/cirrus.sh
    
  2. ci: print env to allow reproducing the job outside of CI 4e54c03153
  3. jonasnick commented at 5:30 PM on November 3, 2022: contributor

    @real-or-random Yes, I'm not sure how to view this (cat_env is skipped in the test runs I've looked at) and I suppose this contains a lot of stuff that is irrelevant. The goal of this PR is to quickly spot the relevant options in a failng CI task and be able to reproduce them (with high but certainly not perfect accuracy).

  4. real-or-random commented at 11:09 AM on November 4, 2022: contributor

    Yeah, it's skipped for successful tasks due to this line: https://github.com/bitcoin-core/secp256k1/blame/a43e982bca580f4fba19d7ffaf9b5ee3f51641cb/.cirrus.yml#L39

    We should remove the line, I don't know why I included this...

    I suppose this contains a lot of stuff that is irrelevant.

    Right, that's a real drawback.

    I'm not strongly opposed to this PR but it feels it increases our burden work because we'll have to update the list of "relevant" variables every time we add or remove a relevant variable, and this will be easily overlooked.

  5. jonasnick cross-referenced this on Nov 7, 2022 from issue ci: always cat test_env.log by jonasnick
  6. jonasnick commented at 3:51 PM on November 7, 2022: contributor

    It doesn't seem straightforward to take the output of cat_test_env and run cirrus.sh. The lines are not necessarily shell variable assignments due to the spaces and newlines. Even if they were, it's not clear to me how to easily to run cirrus.sh with the same environment (and maybe it's even a bit scary, e.g., env contains PWD).

    If there's no cleverer solution to this, I think it's fine to maintain the list of variables to make it easy to reproduce a test job.

  7. jonasnick commented at 1:28 PM on November 8, 2022: contributor

    We could make it slightly less fragile by setting the shell flag -u ("treat unset variables as an error"). See https://github.com/jonasnick/secp256k1/commit/d45ae832fdee9a9333dcbb2c2d01893fff508bd1 (passes CI). This would probably be worth doing regardless of this PR.

  8. real-or-random commented at 2:39 PM on November 8, 2022: contributor

    We could make it slightly less fragile by setting the shell flag -u ("treat unset variables as an error"). See jonasnick@d45ae83 (passes CI). This would probably be worth doing regardless of this PR.

    We can do that but in what way would this be less fragile?

  9. jonasnick commented at 2:53 PM on November 8, 2022: contributor

    Slightly less fragile because the removal or renaming of any relevant variables that misses the newly added lines would result in an error.

  10. sipa commented at 3:29 PM on November 13, 2022: contributor

    ACK 4e54c03153a307af5cc80c7671ac7eef28138326

  11. real-or-random merged this on Nov 14, 2022
  12. real-or-random closed this on Nov 14, 2022

  13. real-or-random commented at 11:03 PM on November 14, 2022: contributor

    Slightly less fragile because the removal or renaming of any relevant variables that misses the newly added lines would result in an error.

    Hm yes, though having unused variables actually unset (instead of set to the empty string) is also a good idea in CI because that's what the user will probably do. I'm fine either way, I think.

  14. sipa referenced this in commit 9d47e7b71b on Dec 13, 2022
  15. dhruv referenced this in commit 55ffd47cc6 on Dec 14, 2022
  16. dhruv referenced this in commit 967c65b158 on Dec 14, 2022
  17. dhruv referenced this in commit 78b5ddf28b on Jan 11, 2023
  18. dhruv referenced this in commit 215394a1d5 on Jan 11, 2023
  19. div72 referenced this in commit 945b094575 on Mar 14, 2023
  20. str4d referenced this in commit 0df7b459f6 on Apr 21, 2023
  21. vmta referenced this in commit e1120c94a1 on Jun 4, 2023
  22. vmta referenced this in commit 8f03457eed on Jul 1, 2023
  23. jonasnick cross-referenced this on Jul 17, 2023 from issue Upstream PRs 1147, 1149, 1000, 1155, 1156 by jonasnick

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 19:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me