Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: Build with Eask #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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