diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1ce0ac6 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 test + run: make all diff --git a/.gitignore b/.gitignore index 1304fa2..34b4fff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.elc /.cask/ +/.eask/ +/dist/ diff --git a/Eask b/Eask new file mode 100644 index 0000000..86a42de --- /dev/null +++ b/Eask @@ -0,0 +1,18 @@ +(package "php-runtime" + "0.3.1" + "Language binding bridge to PHP") + +(website-url "https://github.com/emacs-php/php-runtime.el") +(keywords "processes" "php" "lisp") + +(package-file "php-runtime.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source 'gnu) +(source 'melpa) + +(depends-on "emacs" "25.1") +(depends-on "compat") + +(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432 diff --git a/Makefile b/Makefile index f08f353..eda3313 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ EMACS ?= emacs -ELS = php-runtime.el php-runtime-test.el -ELCS = $(ELS:.el=.elc) +EASK ?= eask -%.elc: %.el - $(EMACS) -Q -batch -L . -f batch-byte-compile $< +install: + $(EASK) package + $(EASK) install -all: $(ELCS) +compile: + $(EASK) compile + +# TODO: Add `test` back once it's passed on all OSs! +all: clean install compile clean: - rm -f $(ELCS) + $(EASK) clean all -test: clean all - $(EMACS) -Q --batch -L . -l php-runtime-test.el -f ert-run-tests-batch-and-exit +test: + $(EASK) test ert ./php-runtime-test.el .PHONY: clean test