We study single crystals of Dy$_2$Ti$_2$O$_7$ and Ho$_2$Ti$_2$O$_7$ under magnetic field and stress applied along their [001] direction. We find that many of the features that the emergent gauge field of spin ice confers to the macroscopic magnetic properties are preserved in spite of the finite temperature. The magnetisation vs. field shows an upward convexity within a broad range of fields, while the static and dynamic susceptibilities present a peculiar peak. Following this feature for both compounds, we determine a single experimental transition curve: that for the Kasteleyn transition in three dimensions, proposed more than a decade ago. Additionally, we observe that compression up to $-0.8%$ along [001] does not significantly change the thermodynamics. However, the dynamical response of Ho$_2$Ti$_2$O$_7$ is quite sensitive to changes introduced in the ${rm Ho}^{3+}$ environment. Uniaxial compression can thus open up experimental access to equilibrium properties of spin ice at low temperatures.