11import com .fizzed .blaze .Config ;
22import com .fizzed .blaze .Contexts ;
33import com .fizzed .blaze .Task ;
4+ import com .fizzed .buildx .Buildx ;
5+ import com .fizzed .buildx .Target ;
46import com .fizzed .jne .HardwareArchitecture ;
57import com .fizzed .jne .JavaHome ;
68import com .fizzed .jne .JavaHomeFinder ;
@@ -87,4 +89,26 @@ public void test_all_jdks() throws Exception {
8789 jdks .forEach (jdk -> log .info (" {}" , jdk ));
8890 }
8991
92+ private final List <Target > crossTestTargets = asList (
93+ new Target ("linux" , "x64" ).setTags ("test" ).setHost ("build-x64-linux-latest" ),
94+ new Target ("linux" , "arm64" ).setTags ("test" ).setHost ("build-arm64-linux-latest" ),
95+ new Target ("linux" , "riscv64" ).setTags ("test" ).setHost ("build-riscv64-linux-latest" ),
96+ new Target ("macos" , "x64" ).setTags ("test" ).setHost ("build-x64-macos-latest" ),
97+ new Target ("macos" , "arm64" ).setTags ("test" ).setHost ("build-arm64-macos-latest" ),
98+ new Target ("windows" , "x64" ).setTags ("test" ).setHost ("build-x64-windows-latest" ),
99+ new Target ("windows" , "arm64" ).setTags ("test" ).setHost ("build-arm64-windows-latest" ),
100+ new Target ("freebsd" , "x64" ).setTags ("test" ).setHost ("build-x64-freebsd-latest" ),
101+ new Target ("openbsd" , "x64" ).setTags ("test" ).setHost ("build-x64-openbsd-latest" )
102+ );
103+
104+ @ Task (order = 1 )
105+ public void cross_tests () throws Exception {
106+ new Buildx (crossTestTargets )
107+ .tags ("test" )
108+ .execute ((target , project ) -> {
109+ project .action ("mvn" , "clean" , "test" )
110+ .run ();
111+ });
112+ }
113+
90114}
0 commit comments