Boolean Union on Structure of Extruded Cubes failed Non Manifold Edges

this way i got the polysurface i want, still i cant create this pixelated roof like structure with booleandifference , now the boolean difference fails