At sea: nothing. They will likely not even notice it, as the tsunami wave is very small (a couple of feet) and travels at every high speed (500mph or even more). While in port: if there is enough notice, the ship will try to leave and get into open, deep waters. The deeper the water, the less impact there is.