If it's a round or rounded tube I would not advice drilling into it. The rounded part is structural, and if you drill a hole there, the metal could start cracking or tearing. If it's a tube with a flat side then it's OK to drill a hole on the flat surface.
As others already pointed out, having a long cable housing is not great for shifting. So running the cable housing all the way from the shifter to the derailleur is not a good idea. But running the brake cable housing through the top tube is routinely done and not a bad idea.