Skip to content

Commit b01e840

Browse files
authored
Merge pull request #12 from jcs-PR/test/eask
test: Build with Eask
2 parents ba64f30 + 2d212c5 commit b01e840

File tree

4 files changed

+81
-8
lines changed

4 files changed

+81
-8
lines changed

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '**/*.md'
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ${{ matrix.os }}
16+
continue-on-error: ${{ matrix.experimental }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
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]
27+
include:
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
37+
steps:
38+
- uses: jcs090218/setup-emacs@master
39+
with:
40+
version: ${{ matrix.emacs-version }}
41+
42+
- uses: emacs-eask/setup-eask@master
43+
with:
44+
version: 'snapshot'
45+
46+
- uses: actions/checkout@v4
47+
48+
- name: Run test
49+
run: make all

.gitignore

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

Eask

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(package "php-runtime"
2+
"0.3.1"
3+
"Language binding bridge to PHP")
4+
5+
(website-url "https://github.com/emacs-php/php-runtime.el")
6+
(keywords "processes" "php" "lisp")
7+
8+
(package-file "php-runtime.el")
9+
10+
(script "test" "echo \"Error: no test specified\" && exit 1")
11+
12+
(source 'gnu)
13+
(source 'melpa)
14+
15+
(depends-on "emacs" "25.1")
16+
(depends-on "compat")
17+
18+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
EMACS ?= emacs
2-
ELS = php-runtime.el php-runtime-test.el
3-
ELCS = $(ELS:.el=.elc)
2+
EASK ?= eask
43

5-
%.elc: %.el
6-
$(EMACS) -Q -batch -L . -f batch-byte-compile $<
4+
install:
5+
$(EASK) package
6+
$(EASK) install
77

8-
all: $(ELCS)
8+
compile:
9+
$(EASK) compile
10+
11+
# TODO: Add `test` back once it's passed on all OSs!
12+
all: clean install compile
913

1014
clean:
11-
rm -f $(ELCS)
15+
$(EASK) clean all
1216

13-
test: clean all
14-
$(EMACS) -Q --batch -L . -l php-runtime-test.el -f ert-run-tests-batch-and-exit
17+
test:
18+
$(EASK) test ert ./php-runtime-test.el
1519

1620
.PHONY: clean test

0 commit comments

Comments
 (0)