i would like to proof that a compact , connected and oriented $n$-manifold $M$ can't retract onto $\partial M$. My tool is the De Rham cohomology. 

En effet, if there exists $f:M\to \partial M$ such that $f\circ \iota\_{\partial M}=Id\_{\partial M}$, then using the functoriality of cohomological map associated, $\iota^{\*}\_{\partial M}\circ f^{\*}=Id\_{H^{p}\_{dR}(\partial M)}$, thus for each $p\geq 0$, the map $f^{\*}:H^{p}\_{dR}(\partial M)\to H^{p}\_{dR}(M)$ is injective. So, i imagine there is a $p$ where the map injection fails, but with the hypotheses, with $p=n$, $f^{\*}\equiv 0$, and i stopped here. Any tips?