One thing many working-class racers are looking for is to simplify their training. They want straightforward, direct answers to their training questions and concrete solutions to their challenges. In line with that, one of the most common requests I get as a coach is for a set, simple warm-up routine that will work every time. The problem of course is that there are no easy answers and concrete solutions, and there is no magic warm up routine that will work for everyone. That said, it is still possible through trial, error, and science, to develop a routine that will work for you based on an evaluation of situational conditions.
How you warm up for an event will depend on a number of factors: what type of event is it? How long is the event? How important is the event to you? How soon will you need to be at your maximum in the event? What are the weather conditions? Course profile? It's important to know the answer to these questions, because your warm up might vary from an hour of riding with some interval work to simply riding from your car to the start line, just enough to make sure your bike is working correctly.
The shorter and more intense the event, the longer the warm up has to be, and vice versa. I bring up the extreme of simply riding from your car to the start not as a joke, but as a real example. A few years ago I did my first 100K road race of the year. It was cold and wet, my mind was elsewhere, my motivation was low, and the race was long enough to count as my training for the day without me needing to do any extra. So, I got dressed, sat in my warm car doing a crossword puzzle until people started lining up, got on my bike for the first time all day, and rode to the start line. I used the first half of the race to sit in and warm up, bridged to the breakaway once things had settled down, and then won the race.
In this case, the race was sufficiently long enough that I knew I'd have time to warm up. I had no intentions of going with the first move of the day, and there were no major climbs that I had to be ready for. It was also cold enough out that warming up might have had the opposite effect; it was much warmer in my car, and I didn't want to start the race already freezing from being outside trying to warm up. The race wasn't a goal for the year, and I was able to keep my stress level low. This is definitely one end of the spectrum, but a good lesson in taking into account every consideration you face.
At the other extreme, you might have a short time trial where you'll only be racing for 15 minutes or less, and need to be 100% open and ready from start to finish. In this case, your warm up will not only be longer, but also more intense. Opening up all the energy systems with one interval in each zone is often the most complete, compact warm up, and ideal to do on a stationary trainer or rollers. Work up from the lowest intensity, and do the shortest block possible in each: 10-15 minutes of endurance pace, 5-10 minutes of light intensity/tempo work, 5 minutes recovery, 5 minutes at threshold, 5 recovery, and then 1-3 reps of either sprints (if you're getting ready for a mass start race) or 30 seconds at your VO2max pace (if you're getting ready for a time trial), just enough to touch and begin to settle in at that power, but not enough for it to be training. If you time the warm up so that you can climb off your trainer and go straight to the start line within 15 minutes of your start, you'll be about as warmed up as you get. There are studies showing that the timing of the warm up is less important as simply doing the warm up, however, so there really is no need to add stress by being perfect about when you climb off. Anywhere within 30 minutes before your start will be sufficient, and you may prefer a little extra time and less stress.
As you can see, this is a long warm up, and can take as much as 45 minutes. It really should only be done like this when you have a very short event that will have you at and above threshold almost the entire time. It's very easy to "over" warm up and it's important not to do more than your own fitness and endurance can handle. I often see people on the trainer for what seems like hours before a criterium, sweating away, doing intervals, and lighting matches they could be using in the race. They're exhausted before they even get off of the trainer. If your training time is limited and you often are pressed to get in an hour a day during the week, the last thing you need is to spend an hour on the trainer before your event. Don't make your warm up longer and harder than your normal workout.
The ideal approach is to use your own training rides and interval workouts as your data source. When you do intervals, when do you normally feel the best? After an extended block of tempo work? After your first threshold interval? After the first few sprints? What opens you up the best and leaves you primed for the rest of the workout? I think you'll find for most events, a warm up that's somewhere in the middle of the two extremes I presented will be ideal. Again, that might mean an hour of endurance riding, or it might mean 15 minutes with three sprints. The goal is always to do the least amount of warm up necessary; enough to open up, but not so much that it leaves you without enough in reserve for the event itself. It's important to experiment and discover what works best for you while keeping in mind all the factors that will change your warm up routine from race to race.