Skip to content

Commit f6496ae

Browse files
committed
ci: Build with Eask
1 parent 60d30bd commit f6496ae

File tree

5 files changed

+61
-39
lines changed

5 files changed

+61
-39
lines changed

.github/workflows/test.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@ on:
55
paths-ignore:
66
- '**/*.md'
77
- 'etc/*'
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
813

914
jobs:
1015
build:
11-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.os }}
17+
continue-on-error: ${{ matrix.experimental }}
1218
timeout-minutes: 3
1319
strategy:
1420
matrix:
15-
emacs_version:
21+
os: [ubuntu-latest, macos-latest, windows-latest]
22+
emacs-version:
1623
- "26.1"
1724
- "26.3"
1825
- "27.1"
1926
- "27.2"
2027
- "28.1"
2128
- "28.2"
2229
- "29.1"
23-
- release-snapshot
2430
- snapshot
2531
include:
2632
- emacs_version: snapshot
@@ -30,16 +36,16 @@ jobs:
3036
with:
3137
python-version: '3.11'
3238
architecture: 'x64'
33-
- uses: purcell/setup-emacs@master
39+
- uses: jcs090218/setup-emacs@master
3440
with:
3541
version: ${{ matrix.emacs_version }}
36-
- uses: conao3/setup-cask@master
42+
- uses: emacs-eask/setup-eask@master
3743
with:
3844
version: 'snapshot'
3945
- uses: actions/checkout@v4
4046
- name: Run tests
4147
if: matrix.allow_failure != true
42-
run: 'make .cask test'
48+
run: 'make .eask test'
4349
- name: Run tests (allow failure)
4450
if: matrix.allow_failure == true
45-
run: 'make .cask test || true'
51+
run: 'make .eask test || true'

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
*~
33
.dir-locals-2.el
44
/.cask/*
5+
/.eask/*
56
/.keg/*
7+
/dist
68
/.php-cs-fixer.cache
79
php-mode-autoloads.el
810
php_manual_en.json

Eask

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
(package "php-mode"
2+
"1.25.0"
3+
"Major mode for editing PHP code")
4+
5+
(website-url "https://github.com/emacs-php/php-mode")
6+
(keywords "languages" "php")
7+
8+
(package-file "lisp/php-mode.el")
9+
(files
10+
"lisp/php.el"
11+
"lisp/php-complete.el"
12+
"lisp/php-defs.el"
13+
"lisp/php-face.el"
14+
"lisp/php-format.el"
15+
"lisp/php-project.el"
16+
"lisp/php-local-manual.el"
17+
"lisp/php-ide-phpactor.el"
18+
"lisp/php-ide.el"
19+
"lisp/php-mode-debug.el")
20+
21+
(script "test" "echo \"Error: no test specified\" && exit 1")
22+
23+
(source 'melpa)
24+
(source 'gnu)
25+
26+
(depends-on "emacs" "26.1")
27+
28+
(development
29+
(depends-on "phpactor")
30+
(depends-on "pkg-info")
31+
(depends-on "projectile")
32+
(depends-on "smart-jump")
33+
(depends-on "shut-up")
34+
)
35+
36+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

+9-32
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
EMACS ?= emacs
22
CASK ?= cask
3-
ELS = lisp/php.el
4-
ELS += lisp/php-align.el
5-
ELS += lisp/php-complete.el
6-
ELS += lisp/php-defs.el
7-
ELS += lisp/php-face.el
8-
ELS += lisp/php-flymake.el
9-
ELS += lisp/php-format.el
10-
ELS += lisp/php-ide-phpactor.el
11-
ELS += lisp/php-ide.el
12-
ELS += lisp/php-local-manual.el
13-
ELS += lisp/php-mode-debug.el
14-
ELS += lisp/php-mode.el
15-
ELS += lisp/php-project.el
16-
AUTOLOADS = php-mode-autoloads.el
17-
ELCS = $(ELS:.el=.elc)
3+
EASK ?= eask
184

19-
%.elc: %.el
20-
$(EMACS) --batch -L lisp/ -f batch-byte-compile $<
5+
compile:
6+
$(EASK) compile
217

228
all: autoloads $(ELCS) authors
239

@@ -34,19 +20,14 @@ AUTHORS.md: etc/git/AUTHORS.md.in .mailmap
3420
&& printf "FINISHED\n" ; ) \
3521
|| printf "FAILED (non-fatal)\n"
3622

37-
autoloads: $(AUTOLOADS)
23+
autoloads:
24+
$(EASK) generate autoloads
3825

39-
$(AUTOLOADS): $(ELS)
40-
$(EMACS) --batch -L lisp/ --eval \
41-
"(let ((user-emacs-directory default-directory)) \
42-
(require 'package) \
43-
(package-generate-autoloads \"php-mode\" (expand-file-name \"lisp\")))"
44-
45-
.cask: Cask
46-
$(CASK) install
26+
.eask: Eask
27+
$(EASK) install
4728

4829
clean:
49-
rm -f $(ELCS) $(AUTOLOADS)
30+
$(EASK) clean all
5031

5132
# Perform any operations that will be useful for developers
5233
# who contribute to PHP Mode.
@@ -66,10 +47,6 @@ dev:
6647
# for an example of using a script like this with the 'git bisect run'
6748
# command.
6849
test: clean all
69-
touch tests/project/1/.git
70-
$(EMACS) --batch -l lisp/php-mode-autoloads.el --eval \
71-
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
72-
(normal-top-level-add-subdirs-to-load-path))" \
73-
-l tests/php-mode-test.el -f ert-run-tests-batch-and-exit
50+
$(EASK) test ert ./tests/php-mode-test.el
7451

7552
.PHONY: all authors autoloads clean test

tests/php-mode-test.el

+1
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ as a keyword."
619619
(ert-deftest php-project-root ()
620620
"Test for detection `php-project-root' by directory."
621621
(dolist (root (mapcar #'car php-project-available-root-files))
622+
(skip-unless (eq system-type windows-nt)) ; TODO: Make test compatible to Windows!
622623
(with-php-mode-test ("project/1/src/functions.php")
623624
(let ((php-project-root root))
624625
(should (string= (expand-file-name "project/1/" php-mode-test-dir)

0 commit comments

Comments
 (0)