diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e911e9a81..0a5a0066b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: - 25.3 - 26.3 - 27.1 - - snapshot + - 29.2 steps: - uses: purcell/setup-emacs@master with: @@ -24,6 +24,10 @@ jobs: run: | emacs --version + - name: Test lack of byte-compile warnings + run: | + make compile-check + - name: Run tests run: | make test diff --git a/Makefile b/Makefile index 2144a921b..4b58fbbd0 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,14 @@ DOC = doc TAG = ELCFILES = $(FILES:.el=.elc) +ELCFILES_CHECK = $(FILES:.el=.elc) -.PHONY: all compile compile-batch docstrings doc clean tests test emacs term terminal profiler indent elpa version +.PHONY: all compile compile-check compile-batch docstrings doc clean tests test emacs term terminal profiler indent elpa version # Byte-compile Evil. all: compile compile: $(ELCFILES) +compile-check: $(ELCFILES_CHECK) .depend: $(FILES) @echo Compute dependencies @@ -28,6 +30,9 @@ compile: $(ELCFILES) $(ELCFILES): %.elc: %.el $(EMACS) --batch -Q -L . -f batch-byte-compile $< +$(ELCFILES_CHECK): %.elc: %.el + $(EMACS) --batch -Q -L . --eval "(setq byte-compile-error-on-warn t)" -f batch-byte-compile $< + # Byte-compile all files in one batch. This is faster than # compiling each file in isolation, but also less stringent. compile-batch: clean @@ -60,7 +65,7 @@ test: --eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}))" # Byte-compile Evil and run all tests. -tests: compile +tests: compile-check $(EMACS) -nw -Q -L . -l evil-tests.el \ --eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}))" rm -f *.elc .depend