Skip to content

Commit d17be30

Browse files
authored
Merge pull request #444 from jcs-PR/ci-eask
Use Eask for CI
2 parents 26ecc90 + 46325b4 commit d17be30

File tree

4 files changed

+53
-51
lines changed

4 files changed

+53
-51
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,34 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
unix-test:
7-
runs-on: ubuntu-latest
6+
test:
7+
runs-on: ${{ matrix.os }}
88
strategy:
9-
max-parallel: 6
9+
fail-fast: false
1010
matrix:
11+
os: [ubuntu-latest, macos-latest, windows-latest]
1112
emacs-version:
1213
- 26.3
1314
- 27.2
15+
- 28.1
1416
# - snapshot
1517

1618
steps:
1719
- uses: actions/checkout@v2
1820

19-
- uses: purcell/setup-emacs@master
21+
- uses: jcs090218/setup-emacs@master
2022
with:
2123
version: ${{ matrix.emacs-version }}
2224

23-
- uses: conao3/setup-cask@master
25+
- uses: actions/setup-node@v2
2426
with:
25-
version: 0.8.4
27+
node-version: '16'
28+
29+
- uses: emacs-eask/setup-eask@master
30+
with:
31+
version: 'snapshot'
2632

2733
- name: Run tests
2834
run: |
29-
make test
35+
make ci
3036

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
*.elc
2+
*-autoloads.el
3+
4+
.eask
5+
/dist

Eask

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(package "rust-mode"
2+
"1.0.4"
3+
"A major-mode for editing Rust source code")
4+
5+
(package-file "rust-mode.el")
6+
7+
(files
8+
"rust-cargo.el"
9+
"rust-compile.el"
10+
"rust-playpen.el"
11+
"rust-rustfmt.el"
12+
"rust-utils.el")
13+
14+
(depends-on "emacs" "25.1")
15+
16+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

Lines changed: 20 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,40 @@ PKG = rust-mode
88

99
EMACS ?= emacs
1010
EMACS_ARGS ?=
11-
12-
ELS = rust-mode.el
13-
ELS += rust-cargo.el
14-
ELS += rust-compile.el
15-
ELS += rust-playpen.el
16-
ELS += rust-rustfmt.el
17-
ELS += rust-utils.el
18-
ELCS = $(ELS:.el=.elc)
11+
EASK ?= eask
1912

2013
DEPS =
2114

2215
LOAD_PATH ?= $(addprefix -L ../,$(DEPS))
2316
LOAD_PATH += -L .
2417

25-
lisp: $(ELCS) loaddefs
18+
# TODO: add checkdoc and lint
19+
ci: build compile test
20+
21+
build:
22+
$(EASK) package
23+
$(EASK) install
2624

27-
%.elc: %.el
25+
compile:
2826
@printf "Compiling $<\n"
29-
@$(EMACS) -Q --batch $(EMACS_ARGS) \
30-
$(LOAD_PATH) --funcall batch-byte-compile $<
27+
$(EASK) compile
3128

3229
test:
33-
@$(EMACS) -Q --batch -L . -l rust-mode.el \
34-
-l rust-mode-tests.el -f ert-run-tests-batch-and-exit
30+
$(EASK) ert rust-mode-tests.el
31+
32+
checkdoc:
33+
$(EASK) checkdoc
34+
35+
lint:
36+
$(EASK) lint
3537

36-
CLEAN = $(ELCS) $(PKG)-autoloads.el
38+
CLEAN = $(PKG)-autoloads.el
3739

3840
clean:
3941
@printf "Cleaning...\n"
4042
@rm -rf $(CLEAN)
43+
$(EASK) clean-all
4144

42-
loaddefs: $(PKG)-autoloads.el
43-
44-
define LOADDEFS_TMPL
45-
;;; $(PKG)-autoloads.el --- automatically extracted autoloads
46-
;;
47-
;;; Code:
48-
(add-to-list 'load-path (directory-file-name \
49-
(or (file-name-directory #$$) (car load-path))))
50-
51-
;; Local Variables:
52-
;; version-control: never
53-
;; no-byte-compile: t
54-
;; no-update-autoloads: t
55-
;; End:
56-
;;; $(PKG)-autoloads.el ends here
57-
endef
58-
export LOADDEFS_TMPL
59-
#'
60-
61-
$(PKG)-autoloads.el: $(ELS)
45+
$(PKG)-autoloads.el:
6246
@printf "Generating $@\n"
63-
@printf "%s" "$$LOADDEFS_TMPL" > $@
64-
@$(EMACS) -Q --batch --eval "(progn\
65-
(setq make-backup-files nil)\
66-
(setq vc-handled-backends nil)\
67-
(setq default-directory (file-truename default-directory))\
68-
(setq generated-autoload-file (expand-file-name \"$@\"))\
69-
(setq find-file-visit-truename t)\
70-
(update-directory-autoloads default-directory))"
71-
47+
$(EASK) autoloads

0 commit comments

Comments
 (0)