diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 4adede9f0e..e0480e62d0 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -12,8 +12,15 @@ _() { "$@" } -if [[ $(ulimit -n) -lt 65000 ]]; then - ulimit -n 65000 || echo 'Error: nofiles too small, run "ulimit -n 65000" to continue' && exit 1 +maxOpenFds=65000 +if [[ $(uname) = Darwin ]]; then + maxOpenFds=24576 # Appears to be the max permitted on macOS... +fi +if [[ $(ulimit -n) -lt $maxOpenFds ]]; then + ulimit -n $maxOpenFds|| { + echo 'Error: nofiles too small, run "ulimit -n 65000" to continue'; + exit 1 + } fi _ cargo build --all --verbose