Skip to content

Commit 7af8a5a

Browse files
committed
ci: check for lack of byte-compilation warnings
As part of that we test with latest released Emacs version rather than snapshot, because we don't want CI to start suddenly failing on unrelated changes because upstream introduced a new warning/check.
1 parent 3366a6e commit 7af8a5a

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/test.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- 25.3
1313
- 26.3
1414
- 27.1
15-
- snapshot
15+
- 29.2
1616
steps:
1717
- uses: purcell/setup-emacs@master
1818
with:
@@ -24,6 +24,10 @@ jobs:
2424
run: |
2525
emacs --version
2626
27+
- name: Test lack of byte-compile warnings
28+
run: |
29+
make compile-check
30+
2731
- name: Run tests
2832
run: |
2933
make test

Makefile

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ DOC = doc
99
TAG =
1010

1111
ELCFILES = $(FILES:.el=.elc)
12+
ELCFILES_CHECK = $(FILES:.el=.elc)
1213

13-
.PHONY: all compile compile-batch docstrings doc clean tests test emacs term terminal profiler indent elpa version
14+
.PHONY: all compile compile-check compile-batch docstrings doc clean tests test emacs term terminal profiler indent elpa version
1415

1516
# Byte-compile Evil.
1617
all: compile
1718
compile: $(ELCFILES)
19+
compile-check: $(ELCFILES_CHECK)
1820

1921
.depend: $(FILES)
2022
@echo Compute dependencies
@@ -28,6 +30,9 @@ compile: $(ELCFILES)
2830
$(ELCFILES): %.elc: %.el
2931
$(EMACS) --batch -Q -L . -f batch-byte-compile $<
3032

33+
$(ELCFILES_CHECK): %.elc: %.el
34+
$(EMACS) --batch -Q -L . --eval "(setq byte-compile-error-on-warn t)" -f batch-byte-compile $<
35+
3136
# Byte-compile all files in one batch. This is faster than
3237
# compiling each file in isolation, but also less stringent.
3338
compile-batch: clean
@@ -60,7 +65,7 @@ test:
6065
--eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}))"
6166

6267
# Byte-compile Evil and run all tests.
63-
tests: compile
68+
tests: compile-check
6469
$(EMACS) -nw -Q -L . -l evil-tests.el \
6570
--eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}))"
6671
rm -f *.elc .depend

0 commit comments

Comments
 (0)