Skip to content

Commit 25d65bf

Browse files
authored
Merge pull request #44 from jcs-PR/test/eask
test: Build with Eask
2 parents 2dc25cb + 085e1a1 commit 25d65bf

File tree

4 files changed

+65
-41
lines changed

4 files changed

+65
-41
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,51 @@ on:
44
push:
55
paths-ignore:
66
- '**/*.md'
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
712

813
jobs:
914
build:
10-
runs-on: ubuntu-latest
15+
runs-on: ${{ matrix.os }}
16+
continue-on-error: ${{ matrix.experimental }}
1117
strategy:
18+
fail-fast: false
1219
matrix:
13-
emacs_version:
14-
- "26.3"
15-
- "27.1"
16-
- snapshot
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
emacs-version:
22+
- 26.3
23+
- 27.2
24+
- 28.2
25+
- 29.1
26+
experimental: [false]
1727
include:
18-
- emacs_version: snapshot
19-
allow_failure: true
28+
- os: ubuntu-latest
29+
emacs-version: snapshot
30+
experimental: true
31+
- os: macos-latest
32+
emacs-version: snapshot
33+
experimental: true
34+
- os: windows-latest
35+
emacs-version: snapshot
36+
experimental: true
2037
steps:
2138
- uses: actions/setup-python@v2
2239
with:
2340
python-version: '3.x'
2441
architecture: 'x64'
2542

26-
- uses: purcell/setup-emacs@master
43+
- uses: jcs090218/setup-emacs@master
2744
with:
28-
version: ${{ matrix.emacs_version }}
45+
version: ${{ matrix.emacs-version }}
2946

30-
- uses: conao3/setup-cask@master
47+
- uses: emacs-eask/setup-eask@master
3148
with:
3249
version: 'snapshot'
3350

34-
- uses: actions/checkout@v2
51+
- uses: actions/checkout@v4
3552

3653
- name: Run make
37-
uses: nick-invision/retry@v2
38-
with:
39-
timeout_seconds: 90
40-
max_attempts: 3
41-
command: 'cask && make'
54+
run: 'make all'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*.elc
22
/*-autoloads.el
33
/.cask
4+
/.eask
5+
/dist
46
/composer.lock
57
/vendor

Eask

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(package "phpstan"
2+
"0.7.2"
3+
"Interface to PHPStan (PHP static analyzer)")
4+
5+
(website-url "https://github.com/emacs-php/phpstan.el")
6+
(keywords "tools" "php")
7+
8+
(package-file "phpstan.el")
9+
(files "*.el")
10+
11+
(script "test" "echo \"Error: no test specified\" && exit 1")
12+
13+
(source 'gnu)
14+
(source 'melpa)
15+
16+
(depends-on "emacs" "24.3")
17+
(depends-on "compat")
18+
(depends-on "php-mode")
19+
(depends-on "php-runtime")
20+
(depends-on "flycheck")
21+
22+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,21 @@
11
EMACS ?= emacs
22
CASK ?= cask
3-
ELS = phpstan.el flycheck-phpstan.el flymake-phpstan.el
4-
AUTOLOADS = phpstan-autoloads.el
5-
ELCS = $(ELS:.el=.elc)
3+
EASK ?= eask
64

7-
.el.elc: .cask
8-
$(EMACS) -Q -batch -L . --eval \
9-
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
10-
(require 'package) \
11-
(normal-top-level-add-subdirs-to-load-path))" \
12-
-f package-initialize -f batch-byte-compile $<
5+
install:
6+
$(EASK) package
7+
$(EASK) install
8+
$(EASK) install-deps
139

14-
.cask: Cask
15-
$(CASK)
10+
compile:
11+
$(EASK) compile
1612

17-
all: clean autoloads $(ELCS)
13+
all: clean autoloads install compile
1814

19-
autoloads: $(AUTOLOADS)
20-
21-
$(AUTOLOADS): $(ELCS)
22-
$(EMACS) -Q -batch -L . --eval \
23-
"(progn \
24-
(require 'package) \
25-
(normal-top-level-add-subdirs-to-load-path) \
26-
(package-generate-autoloads \"phpstan\" default-directory))"
15+
autoloads:
16+
$(EASK) generate autoloads
2717

2818
clean:
29-
-rm -f $(ELCS) $(AUTOLOADS)
30-
31-
clobber: clean
32-
-rm -f .cask
19+
$(EASK) clean all
3320

34-
.PHONY: all autoloads clean clobber
21+
.PHONY: all autoloads clean

0 commit comments

Comments
 (0)