Obviously I've matured by now but I used to do that as a kid all the way till age 13. I wasn't always giving him an attitude nor teasing him though. Certain times I would be nicer and have a normal conversation. Other times I would act like a frenemy.
Eventually he and others figured it out and were very confused. They couldn't understand why I couldn't just be my natural, nicer self and say what I feel without the ''pretending to hate him'' thing. Is it common when a school boy or girl pretends to hate you but actually always liked/loved you?