Skip to content

Commit

Permalink
Merge pull request #44 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 2dc25cb + 085e1a1 commit 25d65bf
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 41 deletions.
45 changes: 29 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,51 @@ on:
push:
paths-ignore:
- '**/*.md'
workflow_dispatch:

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

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
emacs_version:
- "26.3"
- "27.1"
- snapshot
os: [ubuntu-latest, macos-latest, windows-latest]
emacs-version:
- 26.3
- 27.2
- 28.2
- 29.1
experimental: [false]
include:
- emacs_version: snapshot
allow_failure: true
- 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: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'

- uses: purcell/setup-emacs@master
- uses: jcs090218/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
version: ${{ matrix.emacs-version }}

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

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Run make
uses: nick-invision/retry@v2
with:
timeout_seconds: 90
max_attempts: 3
command: 'cask && 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 @@
*.elc
/*-autoloads.el
/.cask
/.eask
/dist
/composer.lock
/vendor
22 changes: 22 additions & 0 deletions Eask
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
(package "phpstan"
"0.7.2"
"Interface to PHPStan (PHP static analyzer)")

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

(package-file "phpstan.el")
(files "*.el")

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

(source 'gnu)
(source 'melpa)

(depends-on "emacs" "24.3")
(depends-on "compat")
(depends-on "php-mode")
(depends-on "php-runtime")
(depends-on "flycheck")

(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
37 changes: 12 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
EMACS ?= emacs
CASK ?= cask
ELS = phpstan.el flycheck-phpstan.el flymake-phpstan.el
AUTOLOADS = phpstan-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
$(EASK) install-deps

.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 \"phpstan\" 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 25d65bf

Please sign in to comment.