Switzerland beat France 5-4 on penalties after a six goal thrilling regular time at Bucharest to book a place in the quarter-final of Euro 2020.