Advice please....

Lyndsee
My guy and I have been doing the on off routine for years.... He cheated on me and kept secrets that always seem to come up at the worst times and never by his own mouth. He tells me he feels off spending time with me so only shows up late at night to sleep next to me. He went on for months saying he didn't like sex to later complain I never give it to him. I feel like everything I do is wrong and he can't decide what he wants. He keeps saying he cares and is working on being better but I'm exhausted of trying and hurting. I love him and don't want to lose him but I'm not sure if I have the energy to keep putting effort into a relationship that it seems like he only cares about when I'm ready to give up.... Should I finally stop waiting?