diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fb1081a..bcd3ce7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -41,15 +41,14 @@ jobs: - name: Generate stats run: | make stats # Build compressed artifacts + echo "### JavaScript stats" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - make stats^js >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo -e "| Lines | Bytes | File |\n| ----- | ----- | ---- |" + make stats^js | awk '/ *[0-9]+/ {print "| "$1" | "$2" | "$3" | "}' >> $GITHUB_STEP_SUMMARY + echo "### Python stats" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - make stats^python >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo -e "| Lines | Bytes | File |\n| ----- | ----- | ---- |" + make stats^python | awk '/ *[0-9]+/ {print "| "$1" | "$2" | "$3" | "}' >> $GITHUB_STEP_SUMMARY + echo "### ClojureScript stats" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - make stats^cljs >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + make stats^cljs | awk '/ *[0-9]+/ {print "| "$1" | "$2" | "$3" | "}' >> $GITHUB_STEP_SUMMARY diff --git a/cljs/Makefile b/cljs/Makefile index 2dc174e..497782f 100644 --- a/cljs/Makefile +++ b/cljs/Makefile @@ -68,13 +68,13 @@ miniMAL.js: node_modules/shadow-cljs src/miniMAL/stepA_miniMAL.cljc # Stats # stats^%: src/miniMAL/%.cljc src-min/miniMAL/%.cljc - @wc $^ | grep -v "total" + @wc -l -c $^ | grep -v "total" .PHONY: clean stats stats: $(foreach s,$(STEPS),stats^$(s)) miniMAL core.json - @wc miniMAL core.json | grep -v "total" + @wc -l -c miniMAL core.json | grep -v "total" clean: rm -f $(MIN_FILES) diff --git a/js/Makefile b/js/Makefile index df0fa42..d9a4330 100644 --- a/js/Makefile +++ b/js/Makefile @@ -52,10 +52,10 @@ regpack^%: %-regpack.js # Stats # stats^%: %.js %-regpack.js - @wc $^ | grep -v "total" + @wc -l -c $^ | grep -v "total" stats-full^%: %.js %-uglify.js %-regpack.js - @wc $^ | grep -v "total" + @wc -l -c $^ | grep -v "total" # # Web @@ -94,9 +94,9 @@ miniMAL-core.js: core.json .PHONY: regpack stats stats-full clean regpack: $(foreach s,$(STEPS),regpack^$(s)) stats: $(foreach s,$(STEPS),stats^$(s)) core.json $(NODE_FILES) $(WEB_FILES) - @wc core.json $(NODE_FILES) $(WEB_FILES) | grep -v "total" + @wc -l -c core.json $(NODE_FILES) $(WEB_FILES) | grep -v "total" stats-full: $(foreach s,$(STEPS),stats-full^$(s)) core.json $(NODE_FILES) $(WEB_FILES) - @wc core.json $(NODE_FILES) $(WEB_FILES) | grep -v "total" + @wc -l -c core.json $(NODE_FILES) $(WEB_FILES) | grep -v "total" clean: rm -f *-uglify.js *-uglify-pretty.js *-regpack.js miniMAL-js1k.b64 $(NODE_FILES) $(WEB_FILES) diff --git a/python/Makefile b/python/Makefile index 3d17080..6983663 100644 --- a/python/Makefile +++ b/python/Makefile @@ -43,17 +43,17 @@ minipy^%: %-minipy.py # Stats # stats^%: %.py %-minipy.py - @wc $^ | grep -v "total" + @wc -l -c $^ | grep -v "total" stats-full^%: %.py %-minipy.py %.pyz - @wc $^ | grep -v "total" + @wc -l -c $^ | grep -v "total" .PHONY: minipy stats clean minipy: $(foreach s,$(STEPS),minipy^$(s)) stats: $(foreach s,$(STEPS),stats^$(s)) core.json $(MIN_FILES) - @wc core.json $(MIN_FILES) | grep -v "total" + @wc -l -c core.json $(MIN_FILES) | grep -v "total" stats-full: $(foreach s,$(STEPS),stats-full^$(s)) core.json $(MIN_FILES) - @wc core.json $(MIN_FILES) | grep -v "total" + @wc -l -c core.json $(MIN_FILES) | grep -v "total" clean: