Buddha taught that one should develop compassion or karuna both with actions and meditation. This can be seen in Mettanisamsa Sutta:
"Monks, for one whose awareness-release through good will is cultivated, developed, pursued, handed the reins and taken as a basis, given a grounding, steadied, consolidated, and well-undertaken, eleven benefits can be expected"
Although good-will or metta is not the same with compassion, both of them are considered two of the four sublime attitudes, brahmavihara. In this sutta, Buddha mentioned that good-will has to be perfected both in mind and actions for the benefits to be experienced. Thus, the same approach applies to compassion as well.
Besides, in my experience, practicing only metta meditation without performing skillful actions related to loving-kindness still makes me feel like I am a "selfish" person. it is only with the practice of both meditation and skillful actions does one able to perfect the sublime attitudes; meditation depends on skillful actions and skillful actions depend on meditation.
"Metta (Mettanisamsa) Sutta: Good Will" (AN 11.16), translated from the Pali by Thanissaro Bhikkhu. Access to Insight (BCBS Edition), 23 July 2013, http://www.accesstoinsight.org/tipitaka/an/an11/an11.016.than.html