When do you know it’s time to give up on trying to make a relationship work?

When it becomes obvious, after much effort, that it’s only one-sided and your trying to make it work is not being reciprocated.