Use ext4fs as the base filesystem with a few speedup options like
noatime,data=writeback,nobh,barrier=0,commit=300
Then union mount a tmpfs ramdisk on top of that so that files written during the builds get the benefits of the ramdisk. Either change the build procedure to move the resulting binaries off the tmpfs at the end of the build, or merge the tmpfs back into the ext4fs before unmounting.