This house has been being built for years
is horribly clumsy and inelegant.
If I google the expression "has been being built", at my time/space coordinates it currently achieves 24,400 hits.
That figure seems to place this particular "has been being [X]" construction towards the upper end of the prevalence scale: if I substitute almost any other common verb for built, I get far less hits, e.g. eaten (82), drunk (11), got (18), gotten (8), forgotten (27), walked (21), run (89), cooked (40), fried (6), infected (11), cured (13), thought (14), read (77), spoken (31), written (7,600 - all the top hits here discussing whether the usage is allowable), performed (96), planted (15), grown (29), investigated (87), inspected (5), ridden (58), driven (63), cried (6), prayed (16), fucked (11), beaten (29), hunted (21), killed (21), buried (18), prohibited (1), encouraged (12), and questioned (32).
It should be noted that as with written, a fair number of the top hits for some of the other verbs related to the question of how grammatical such a construction is. So it is arguable that they should really be excluded from the counts on the grounds that they represent mentions rather than uses of the terms in question.
The most notable exceptions I found were said (a remarkable 4,260,000 hits), asked (1,175,000), and published (603,000). Done gets 29,700 hits.
The discrepancy between the semantically similar said (4,260,000) and spoken (31) cries out for an explanation, as does that for asked (1,175,000) and questioned (32); unfortunately, I don't have one.
Notwithstanding the above-mentioned outliers, it seems apparent that the "has been being [X]" construction is used little with most verbs.
The underlying idea embedded in your question is much more nicely expressed by your other variant,
They have been building this house for years
or by a form of words that uses a deverbal noun, e.g.
This house has been under construction for years
Alternatively, you can say
The {construction / building} of this house has been underway for years