aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2020-12-18 12:17:53 -0800
committerGitHub <noreply@github.com>2020-12-18 12:17:53 -0800
commit03cbee8637cb2de632db718db62db31c3d08ae4d (patch)
tree907ac196b226d842eb72d87cbec928ba5c4bed0e
parenta9f7d4dccc9cd0351658e64d5fbc809c93ac9b46 (diff)
downloadqmk_firmware-03cbee8637cb2de632db718db62db31c3d08ae4d.tar.gz
qmk_firmware-03cbee8637cb2de632db718db62db31c3d08ae4d.zip
Add the ability to exclude keyboards from travis builds (#11178)
* add the ability to exclude keyboards from travis builds * add filtering to make all: * only skip keyboards during make all: * working implementation * forego a CI_KEYBOARDS variable * optimize the startup by only listing keyboards once * add sort -u to all list_keyboard invocations * move the if else if tree back to 1 level
-rw-r--r--Makefile36
-rw-r--r--keyboards/clueboard/17/.noci0
-rw-r--r--keyboards/clueboard/2x1800/2018/.noci0
-rw-r--r--keyboards/clueboard/60/.noci0
-rw-r--r--keyboards/clueboard/66/rev1/.noci0
-rw-r--r--keyboards/clueboard/66/rev2/.noci0
-rw-r--r--keyboards/clueboard/66_hotswap/prototype/.noci0
-rw-r--r--keyboards/clueboard/card/.noci0
-rwxr-xr-xutil/list_keyboards.sh10
9 files changed, 14 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index c5c71c5a8..a13b92866 100644
--- a/Makefile
+++ b/Makefile
@@ -99,40 +99,13 @@ $(eval $(call NEXT_PATH_ELEMENT))
99# endif 99# endif
100# endif 100# endif
101 101
102define GET_KEYBOARDS
103ifndef ALT_GET_KEYBOARDS
104 All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
105 All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
106 All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
107 All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/rules.mk))
108
109 KEYMAPS_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/keymaps/*/rules.mk))
110 KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/keymaps/*/rules.mk))
111 KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/keymaps/*/rules.mk))
112 KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
113
114 KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
115else
116 KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq)
117endif
118endef
119
120$(eval $(call GET_KEYBOARDS))
121
122# Only consider folders with makefiles, to prevent errors in case there are extra folders
123#KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
124
125.PHONY: list-keyboards 102.PHONY: list-keyboards
126list-keyboards: 103list-keyboards:
127 echo $(KEYBOARDS) 104 util/list_keyboards.sh | sort -u | tr '\n' ' '
128
129define PRINT_KEYBOARD
130 $(info $(PRINTING_KEYBOARD))
131endef
132 105
133.PHONY: generate-keyboards-file 106.PHONY: generate-keyboards-file
134generate-keyboards-file: 107generate-keyboards-file:
135 $(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD))) 108 util/list_keyboards.sh | sort -u
136 109
137.PHONY: clean 110.PHONY: clean
138clean: 111clean:
@@ -159,7 +132,6 @@ endif
159# $(info Keyboard: $(KEYBOARD)) 132# $(info Keyboard: $(KEYBOARD))
160# $(info Keymap: $(KEYMAP)) 133# $(info Keymap: $(KEYMAP))
161# $(info Subproject: $(SUBPROJECT)) 134# $(info Subproject: $(SUBPROJECT))
162# $(info Keyboards: $(KEYBOARDS))
163 135
164 136
165# Set the default goal depending on where we are running make from 137# Set the default goal depending on where we are running make from
@@ -294,7 +266,7 @@ define PARSE_RULE
294 $$(eval $$(call PARSE_TEST)) 266 $$(eval $$(call PARSE_TEST))
295 # If the rule starts with the name of a known keyboard, then continue 267 # If the rule starts with the name of a known keyboard, then continue
296 # the parsing from PARSE_KEYBOARD 268 # the parsing from PARSE_KEYBOARD
297 else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) 269 else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true)
298 KEYBOARD_RULE=$$(MATCHED_ITEM) 270 KEYBOARD_RULE=$$(MATCHED_ITEM)
299 $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) 271 $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
300 # Otherwise use the KEYBOARD variable, which is determined either by 272 # Otherwise use the KEYBOARD variable, which is determined either by
@@ -411,7 +383,7 @@ endef
411# if we are going to compile all keyboards, match the rest of the rule 383# if we are going to compile all keyboards, match the rest of the rule
412# for each of them 384# for each of them
413define PARSE_ALL_KEYBOARDS 385define PARSE_ALL_KEYBOARDS
414 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(KEYBOARDS))) 386 $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell util/list_keyboards.sh noci | sort -u)))
415endef 387endef
416 388
417# $1 Subproject 389# $1 Subproject
diff --git a/keyboards/clueboard/17/.noci b/keyboards/clueboard/17/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/17/.noci
diff --git a/keyboards/clueboard/2x1800/2018/.noci b/keyboards/clueboard/2x1800/2018/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/2x1800/2018/.noci
diff --git a/keyboards/clueboard/60/.noci b/keyboards/clueboard/60/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/60/.noci
diff --git a/keyboards/clueboard/66/rev1/.noci b/keyboards/clueboard/66/rev1/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/66/rev1/.noci
diff --git a/keyboards/clueboard/66/rev2/.noci b/keyboards/clueboard/66/rev2/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/66/rev2/.noci
diff --git a/keyboards/clueboard/66_hotswap/prototype/.noci b/keyboards/clueboard/66_hotswap/prototype/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/66_hotswap/prototype/.noci
diff --git a/keyboards/clueboard/card/.noci b/keyboards/clueboard/card/.noci
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/keyboards/clueboard/card/.noci
diff --git a/util/list_keyboards.sh b/util/list_keyboards.sh
new file mode 100755
index 000000000..672d4a784
--- /dev/null
+++ b/util/list_keyboards.sh
@@ -0,0 +1,10 @@
1#!/bin/sh
2# Temporary shell script to find keyboards
3#
4# This allows us to exclude keyboards by including a .noci file.
5
6find keyboards -type f -name rules.mk | grep -v keymaps | while read keyboard; do
7 keyboard=$(echo $keyboard | sed 's!keyboards/\(.*\)/rules.mk!\1!')
8
9 [ "$1" = "noci" -a -e "keyboards/${keyboard}/.noci" ] || echo "$keyboard"
10done