Summoned monsters are part of the summoner's CR and XP award, and don't give XP. Make it very clear that the summoner can keep doing this for a while and they should get the point. Then use a story award to give bonus exp for a fast kill, especially if you find a way to hint at that in-world (or just plain state it at the table).
For animated creatures and other permanent creations, a general guideline I go by personally is that if the creator didn't become less powerful in the encounter by making them, the players should get XP for them. So undead created anywhere between "yesterday" and "a million years ago" should give XP, because the necromancer is at full power AND has skeleton backup when the players face him. If he created the undead that morning, though, he's missing spell slots he could have been using to oppose the players. It's even worse if he's summoning/creating/animating them right there during the encounter - he's not only spending spells to get them, he's spending actions, in a system where action economy is a Pretty Big Deal. Count those skeletons as part of the necromancer's class abilities, not separate monsters that deserve their own XP awards.
Inspired by other answers or comments: I previously mentioned story awards, but they work even better with something else to attach them to instead of being for just winning fast. Depending on the tone of your game, the necromancer could have anything from undisturbed bodies to kidnapped children he's using to make these skeletons. Award XP for each one that goes undisturbed/is rescued instead of an XP award for "winning the fight in three rounds". Give the players a noticeable time limit, so that the enemy will escape if the skeletons hold them off long enough. There's dramatic gold to be mined here.
Side note: It doesn't directly answer the question, since you specifically ask about XP rewards, but if your necromancer is actually spamming Animate Dead every turn, he's throwing away tons of valuable gemstone. Maybe track how much he has so the PCs also get more loot if they kill him sooner? In 3.5e, it costs 25gp worth of onyx per HD of the animated creature, and he can animate twice his level in HD per turn, and his level has to be at least 7th to get that spell. 7x2x25 gives us 350gp in gems he's burning per turn, assuming he's the minimum level to cast the spell. I'm guessing you're handwaving some of that, but still, the material component reward might be significant, too.