First make the pasta dough adding the pinch of salt to the semolina flour, then slowly add water until the dough becomes slightly sticky. Add the olive oil and keep kneading the dough. If it's too sticky add some more flour, if it's falling apart, add some more water. When you have a soft smooth ball of dough, cover in plastic foil and set in the fridge to rest for about 10 minutes.
To make the Trofie, dust a wooden or marble board with semolina flour and knead the pasta until it doesn't stick anymore to the board. Cut it in small chunks of the same thickness then roll them into thin strips then make the Trofie shape by rolling it with your hand or with a butter knife (see post above for more details). Set them aside on a clean towel to rest.
Make the Pesto
While the pasta rests, you can make the Pesto. If you're using pestle and mortar, start by crushing the garlic, then add the basil and grind until the leaves are completely crushed. Add the pine nuts and cheese and then continue grinding while adding the olive oil little by little until you get the right consistency.
If you're using a food processor, add all the ingredients together and give it a couple of pulses, then start adding the oil little by little in a thin stream and keep blending until it becomes creamy and lighter in color.
Adjust with salt and add more cheese or pine nuts to your taste.
NOTE: You shouldn't blend more than a couple of minutes, otherwise the pesto will heat up and the basil leaves will oxidize.
Cook the pasta in salted boiling water for 3-4 minutes and serve immediately with the Pesto (the Pesto doesn't need any additional cooking).
Notes
You can keep your fresh pesto sauce in a glass jar in the fridge for about a week. To prevent oxidation, add a layer of olive oil on top of the pesto before closing the lid.