Using new homogeneous luminosity functions (LFs) in the far-ultraviolet (FUV) from VVDS and in the far-infrared (FIR) from Herschel/PEP and Herschel/HerMES, we studied the evolution of the dust attenuation with redshift. With this information, we were able to estimate the redshift evolution of the total (FUV + FIR) star formation rate density (SFRD_TOT). By integrating SFRD_TOT, we followed the mass building and analyzed the redshift evolution of the stellar mass density (SMD). This article aims at providing a complete view of star formation from the local Universe to z ~ 4 and, using assumptions on earlier star formation history, compares this evolution with previously published data in an attempt to draw a homogeneous picture of the global evolution of star formation in galaxies. Our main conclusions are that: 1) the dust attenuation A_FUV is found to increase from z = 0 to z ~ 1.2 and then starts to decrease until our last data point at z = 3.6; 2) the estimated SFRD confirms published results to z ~ 2. At z > 2, we observe either a plateau or a small increase up to z ~ 3 and then a likely decrease up to z = 3.6; 3) the peak of AFUV is delayed with respect to the plateau of SFRD_TOT and a probable origin might be found in the evolution of the bright ends of the FUV and FIR LFs; 4) using assumptions (exponential rise and linear rise with time) for the evolution of the star formation density from z = 3.6 to z_form = 10, we integrated SFRDTOT and obtained a good agreement with the published SMDs.