Team Sky's Chris Froome has held on to his general classification lead after stage 17 of the Tour de France, while BMC Racing's Tejay van Garderen was forced to retire.