Shane Warne has retired from all forms of cricket after confirming he will not play in this year's Big Bash tournament.