The matrix with template.

Signed-off-by: CyberZHG <CyberZHG@gmail.com>