What they can do is start digging a tunnel in a straight direction, and shine a powerful light through it. How can they check that they are going straight? The always dig orthogonally to the direction defined by a line with a weight.
At a certain point the tunnel, following the curvature of the planet, will deviate from the straight line path of the light.
If they assume$^*$ the planet is a sphere, by measuring the distance at which this happens and with some basic trigonometry can deduce the radius of the planet.
$d =\sqrt{h(2R+h)}$
Why would they do this is another story. Maybe they want to build a fast road, and a straight path seems to be the most efficient way, and a certain moment they notice they can't see all the light at the end of it.
$^*$ The assumption can be done after noticing that the phenomenon happens in every direction they pick for digging the tunnel.