Skip to content

Commit 91945f1

Browse files
authored
Merge pull request #11 from jcs-PR/test/eask
test: Build with Eask
2 parents 5af1707 + 37412b6 commit 91945f1

File tree

4 files changed

+81
-25
lines changed

4 files changed

+81
-25
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 make
49+
run: make all

.gitignore

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

Eask

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
(package "composer"
2+
"0.2.0"
3+
"Interface to PHP Composer")
4+
5+
(website-url "https://github.com/emacs-php/composer.el")
6+
(keywords "tools" "php" "dependency" "manager")
7+
8+
(package-file "composer.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 "seq")
17+
(depends-on "php-runtime")
18+
19+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
11
EMACS ?= emacs
22
CASK ?= cask
3-
ELS = composer.el
4-
AUTOLOADS = composer-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
138

14-
.cask: Cask
15-
$(CASK)
9+
compile:
10+
$(EASK) compile
1611

17-
all: clean autoloads $(ELCS)
12+
all: clean autoloads install compile
1813

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 \"composer\" default-directory))"
14+
autoloads:
15+
$(EASK) generate autoloads
2716

2817
clean:
29-
-rm -f $(ELCS) $(AUTOLOADS)
30-
31-
clobber: clean
32-
-rm -f .cask
18+
$(EASK) clean all
3319

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

0 commit comments

Comments
 (0)