Skip to content

Commit

Permalink
Merge pull request #11 from jcs-PR/test/eask
Browse files Browse the repository at this point in the history
test: Build with Eask
  • Loading branch information
zonuexe authored Sep 13, 2023
2 parents 5af1707 + 37412b6 commit 91945f1
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 25 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
paths-ignore:
- '**/*.md'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
emacs-version:
- 26.3
- 27.2
- 28.2
- 29.1
experimental: [false]
include:
- os: ubuntu-latest
emacs-version: snapshot
experimental: true
- os: macos-latest
emacs-version: snapshot
experimental: true
- os: windows-latest
emacs-version: snapshot
experimental: true
steps:
- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}

- uses: emacs-eask/setup-eask@master
with:
version: 'snapshot'

- uses: actions/checkout@v4

- name: Run make
run: make all
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*-autoloads.el
*.elc
.cask
.eask
/dist
composer.lock
vendor/*
19 changes: 19 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(package "composer"
"0.2.0"
"Interface to PHP Composer")

(website-url "https://github.com/emacs-php/composer.el")
(keywords "tools" "php" "dependency" "manager")

(package-file "composer.el")

(script "test" "echo \"Error: no test specified\" && exit 1")

(source 'gnu)
(source 'melpa)

(depends-on "emacs" "25.1")
(depends-on "seq")
(depends-on "php-runtime")

(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
36 changes: 11 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
EMACS ?= emacs
CASK ?= cask
ELS = composer.el
AUTOLOADS = composer-autoloads.el
ELCS = $(ELS:.el=.elc)
EASK ?= eask

.el.elc: .cask
$(EMACS) -Q -batch -L . --eval \
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
(require 'package) \
(normal-top-level-add-subdirs-to-load-path))" \
-f package-initialize -f batch-byte-compile $<
install:
$(EASK) package
$(EASK) install

.cask: Cask
$(CASK)
compile:
$(EASK) compile

all: clean autoloads $(ELCS)
all: clean autoloads install compile

autoloads: $(AUTOLOADS)

$(AUTOLOADS): $(ELCS)
$(EMACS) -Q -batch -L . --eval \
"(progn \
(require 'package) \
(normal-top-level-add-subdirs-to-load-path) \
(package-generate-autoloads \"composer\" default-directory))"
autoloads:
$(EASK) generate autoloads

clean:
-rm -f $(ELCS) $(AUTOLOADS)

clobber: clean
-rm -f .cask
$(EASK) clean all

.PHONY: all autoloads clean clobber
.PHONY: all autoloads clean

0 comments on commit 91945f1

Please sign in to comment.