Cristiano Ronaldo was on target as Real Madrid beat Manchester City 4-1 in the International Champions Cup in Melbourne.