Honestly, I was debating about asking this in relation to medieval warfare as well, but one of my favorite operas is Berlioz's Les Troyens, in which the women of Troy kill themselves rather than submit to the oncoming army. It's a dramatic scene but I don't know if it was Berlioz's invention or not.
Regardless, there were obviously horrific consequences for the women of falling cities. Most art seems to involve heroic men falling by the sword and helpless women being dragged away for rape/enslavement, but I was wondering if there would be any expectation for women to take up arms. It seems rather silly to keep one half of your population standing by while the other half mans the ramparts. Would women have been expected to take up arms and fight? Would they be hidden away, as depicted in many movies/TV shows/etc.? Was suicide a preferred option? Or was it survive at all costs, even if that meant submitting to rape and enslavement?
I'm sure various women did all of the above at one point or another, but I'd be interested in societal expectations of what they "should" do.
About 494 BC, the Spartans inflicted a crushing defeat on the Argives at Sepeia, killing as many as 6,000 of their men. The victorious Spartan king Kleomenes then marched on Argos itself, expecting to take it without a fight. But it turned out that he had only defeated half of the city's defenders:
When Kleomenes led his troops to Argos there were no men to defend it. But Telesilla mounted on the wall all the slaves and those who were too young or too old to carry weapons, and she herself, collecting the arms in the sanctuaries and those that were left in the houses, armed the women of vigorous age, and then posted them where she knew the enemy would attack. When the Spartans advanced, the women were not dismayed at their battle cry, but stood their ground and fought valiantly. Then the Spartans, realizing that to destroy the women would be an invidious success while defeat would mean a shameful disaster, gave way before the women.
-- Pausanias 2.20.8-9
Admittedly, the tale of Telesilla is as glorious as it is rare. There are no other known examples in Greek history of a woman bravely leading the women of a city in a spirited defence of their homes and families. In fact, Herodotos says nothing about Telesilla in his account of the same events, and the whole story may be a later invention.
But that doesn't mean that such things didn't happen.
The stereotype of Classical Greek gender roles is that they were very strict: men lived in public, women in private. Men ruled the state, women the household. Men were warriors, women were not. There is little doubt that these gender divisions reflected the ideals of Greek men. In practice, however, we know that necessity overruled such ideals, and that the real boundaries between male and female roles were often blurry. And this was never more true than in war.
This is not to say that women ever put on hoplite armour and marched out with the male citizens to go and fight in pitched battle. We have no evidence that this ever happened. But we do know that, in times of war, women were not just known to do things normally considered off limits, but that they were expected to do so.
How do we know this? Because our sources scold the women of Sparta for their failure to help defend their city. When the Thebans invaded in 370 BC, the Spartan women had never before faced the ordeal of an invasion or the threat of an enemy on their soil; they accordingly panicked and spread despair instead of doing what they could to contribute to the defence. Xenophon, Plato and Aristotle all point out their relative uselessness, and Plutarch sketches king Agesilaos' struggle to organise the defences in vivid terms:
Agesilaos was still more harassed by the tumults and shrieks and running about throughout the city, where the elder men were enraged at the state of affairs, and the women were unable to keep quiet, but were utterly beside themselves when they heard the shouts and saw the fires of the enemy.
-- Plutarch, Life of Agesilaos 31.4
All these authors consider it a fatal shortcoming of the women of Sparta that they were unable to keep calm and do their part - unlike Greek women elsewhere:
They rendered no useful service, like the women in other states, while they caused more confusion than the enemy.
-- Aristotle, Politics 1296b
In other words, as a woman resident of a city under attack, you will be expected to help in its defence. There is no room for deadweight and no use for simpering cowards; the whole community is at stake, and the community includes you. So, what exactly will you be asked or required to do in case of war?
First of all, if your state has been at war for some time and normal economic life is interrupted, you may be forced to take on paid work to support your family. We learn from a court speech (Demosthenes 57) that the Athenian Nikarete was forced to work as a wetnurse during the Peloponnesian War - a line of work normally considered beneath a free citizen, but one that sustained many a respectable woman's household while the city was under siege.
Second, you will be expected to support the fighting men. This support could take many forms, from cooking and tending wounds, building and repairing walls, hauling water and missiles to the ramparts, spying and carrying messages, to putting on mock armour and taking a post to decieve the enemy. The presence of women in these roles was absolutely essential to an effective defence. When the people of Plataiai faced a Spartan siege, they worked together with the Athenians to evacuate all who were not needed or could not fight; the remaining garrison consisted of "400 of their own citizens, 80 Athenians, and 110 women to bake their bread" (Thucydides 2.78.3).
Third, if worse comes to worst and the enemy attacks the city, you will definitely be expected to fight. The particular contribution of women to the battle is almost a cliché in the surviving sources. Their battle station was on the rooftops of the town, and their weapon was the rooftile:
The men shouted and charged them, and the women and slaves screamed and yelled from the houses and pelted them with stones and tiles; besides, it had been raining hard all night; and so at last their courage gave way, and they turned and fled through the town.
-- Thuc. 2.4.2
After a day's interval hostilities recommenced, victory remaining with the commons, who had the advantage in numbers and position, the women also valiantly assisting them, pelting with tiles from the houses, and supporting the melee with a courage against their nature.
-- Thuc. 3.74.1
And as the Carthaginians pressed the attack, the multitudes of women and children took refuge on the housetops whence they threw both stones and tiles on the enemy.
-- Diodoros 13.56.7
In short, women in a Greek city under assault would typically not be sitting in a hideout hoping for the horror to end. They would be helping out with the war effort, since their labour was indispensable to its success; they would be eager to help, since they knew what their fate would be if the city fell. It should not surprise us that we have stories like that of Telesilla heroically leading the defence of Argos when all the men had been slaughtered. It seems likely that such things really did happen. Even the notoriously misogynist Greeks did not want their women standing idly by as the strength of the men failed.
This answer is largely based on a conference paper by the excellent Dr Jennifer Martinez, soon to be published in Konijnendijk/Kucewicz/Lloyd (eds.), Beyond the Phalanx: Greek Warfare and the Mediterranean.
Also check out this link to another post by u/iphikrates: https://www.reddit.com/r/AskHistorians/comments/5cqh74/what_actually_happens_when_a_city_is_sacked/?utm_source=share&utm_medium=ios_app
Edit to add username.