Constraints on dark matter scenarios from measurements of the galaxy luminosity function at high redshifts