Picks up #31367. Closes #29840.
Limit adjustment is moved until after compilation, otherwise compilation might not succeed.
I’ve used compilation flags to limit the stack size in the native macOS jobs, because trying to use ulimit
resulted in:
0+ '[' -n 1 ']'
1+ ulimit -s 262144
2/Users/runner/work/bitcoin/bitcoin/ci/test/03_test_script.sh: line 17: ulimit: stack size: cannot modify limit: Operation not permitted
See example failures (ulimit -s 64
) here: https://github.com/bitcoin/bitcoin/runs/46861548042.