Add new matcha nexus targets specific to CI
Change-Id: I628485fbdb0648c0b6d2a7a6ebc9074ce47f3aff
diff --git a/platforms/nexus/matcha_hw.mk b/platforms/nexus/matcha_hw.mk
index d670bf4..82db028 100644
--- a/platforms/nexus/matcha_hw.mk
+++ b/platforms/nexus/matcha_hw.mk
@@ -100,6 +100,26 @@
\( -wholename "*ST-*/*fpga_nexus.elf" -o -wholename "*ST-*/*fpga_nexus.bin" \) \
-exec cp -f '{}' "$(MATCHA_FPGA_MATCHA_BINARY_DIR)" \;
+matcha_fpga_tests_ci: | $(MATCHA_FPGA_MATCHA_BINARY_DIR)
+ cd $(MATCHA_SRC_DIR) && \
+ bazel query 'attr(tags, "CI", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
+ | xargs bazel build
+ cd $(MATCHA_SRC_DIR) && \
+ find 'bazel-out/' \
+ -type f \
+ \( -wholename "*ST-*/*fpga_nexus.elf" -o -wholename "*ST-*/*fpga_nexus.bin" \) \
+ -exec cp -f '{}' "$(MATCHA_FPGA_MATCHA_BINARY_DIR)" \;
+
+matcha_fpga_tests_ci_flaky: | $(MATCHA_FPGA_MATCHA_BINARY_DIR)
+ cd $(MATCHA_SRC_DIR) && \
+ bazel query 'attr(tags, "CI_FLAKY", //sw/device/tests/...) intersect attr(name, ".*_fpga_nexus_bin", //sw/device/tests/...)' \
+ | xargs bazel build
+ cd $(MATCHA_SRC_DIR) && \
+ find 'bazel-out/' \
+ -type f \
+ \( -wholename "*ST-*/*fpga_nexus.elf" -o -wholename "*ST-*/*fpga_nexus.bin" \) \
+ -exec cp -f '{}' "$(MATCHA_FPGA_MATCHA_BINARY_DIR)" \;
+
$(MATCHA_FPGA_KELVIN_BINARY_DIR):
mkdir -p "$(MATCHA_FPGA_KELVIN_BINARY_DIR)"