I'm not going to try in a compulsory school race
Why wouldn't you want to try to win the race?
I don't care about these school events.
You should try in the race even if you don't care about it. In the long run, it doesn't matter, but you might feel better about yourself if you give it your best.
I'll try my best.
That's great. If you try your best, you won't have any regrets. People will appreciate that you tried and took the race seriously.