A crane has caught fire and collapsed at a building site at Sydney's University of Technology.

The fire started in the cab but the driver was able to escape before the crane's boom fell on to a nearby roof.