Skip to content

Commit

Permalink
Add CI and test Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jakewilliami committed Apr 22, 2024
1 parent 4b990d6 commit a26f00e
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
pull_request:
push:
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version:
- 27.1
- 27.2
- 28.1
- 28.2
- snapshot
steps:
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}

- uses: actions/checkout@v2
- name: Run tests
run: make
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
EMACS ?= emacs

# A space-separated list of required package names
NEEDED_PACKAGES = package-lint

INIT_PACKAGES="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(dolist (pkg '(${NEEDED_PACKAGES})) \
(unless (package-installed-p pkg) \
(unless (assoc pkg package-archive-contents) \
(package-refresh-contents)) \
(package-install pkg))) \
)"

all: compile package-lint clean-elc

package-lint:
${EMACS} -Q --eval ${INIT_PACKAGES} -batch -f package-lint-batch-and-exit splunk-mode.el

compile: clean-elc
${EMACS} -Q --eval ${INIT_PACKAGES} -L . -batch -f batch-byte-compile *.el

clean-elc:
rm -f f.elc

.PHONY: all compile clean-elc package-lint

0 comments on commit a26f00e

Please sign in to comment.