Context. Studies of the infrared (IR) emission of cosmic sources have proven essential to constraining the evolutionary history of cosmic star formation and the gravitational accretion of nuclear black holes, because many of these events occur inside heavily dustextinguished environments. Aims. The Spitzer Space Telescope has provided a large amount of data to constrain the nature and cosmological evolution of infrared source populations. In the present paper we exploit a large homogeneous dataset to derive a self-consistent picture of IR emission based on the time-dependent λ eff = 24, 15, 12, and 8 μm monochromatic and bolometric IR luminosity functions (LF) over the full 0 < z < 2.5 redshift range. Methods. Our present analysis is based on a combination of data from deep Spitzer surveys of the VIMOS VLT Deep Survey (VVDS-SWIRE) and GOODS fields. To our limiting flux of S 24 = 400 μJy, our sample derived from VVDS-SWIRE includes 1494 sources, and 666 and 904 sources brighter than S 24 = 80 μJy are catalogued in GOODS-S and GOODS-N, respectively, for a total area of ∼0.9 square degrees. Apart from a few galaxies, we obtain reliable optical identifications and redshifts for all these sources, providing a rich and robust dataset for our luminosity function determination. The final combined reliable sample includes 3029 sources, the fraction with photometric redshifts being 72% over all redshifts and almost all galaxies at z > 1.5. Based on the multiwavelength information available in these areas, we constrain the LFs at 8, 12, 15, and 24 μm. We also infer the total IR luminosities from our best-fit model of the observed SEDs of each source, and use this to derive the bolometric (8−1000 μm) LF and comoving volume emissivity to z ∼ 2.5. Results. In the redshift interval 0 < z < 1, the bolometric IR luminosity density evolves as (1 + z) 3.8±0.4 . Although it is more uncertain at higher-z, our results show a flattening in the IR luminosity density at z > 1. The mean redshift of the peak in the source number density shifts with luminosity: the brightest IR galaxies appear to form stars at earlier cosmic times (z > 1.5), while star formation in the less luminous galaxies continues until more recent epochs (z ∼ 1 for L IR < 10 11 L ), in overall agreement with similar analyses in the literature. Conclusions. Our results are indicative of a rapid increase in the galaxy IR comoving volume emissivity up to z ∼ 1 and a constant average emissivity at z > 1. We also appear to measure a difference in the evolutionary rate of the source number densities as a function of luminosity, which is consistent with the downsizing evolutionary patterns reported for other samples of cosmic sources.