Script succeeded, but build is still running until it times out (+10min)

This looks a lot like this issue: Build doesn't finish after completing tests.

Your build starts a subprocess that doesn’t get reaped when the build ends.