auto detection and build of samples