Black holes and stars in Horndeski theory