Ravichandran Ashwin retired from international cricket after the third Test of the Border-Gavaskar Trophy played between India and Australia at Gabba.