Skip to content

Commit

Permalink
Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 6, 2024
1 parent 890c692 commit 0b2a3d2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: "chore"
include: "scope"
17 changes: 14 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
- '**.md'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: purcell/setup-emacs@master
with:
version: 29.4
- uses: actions/checkout@v4
- name: Run tests
run: make package-lint

build:
runs-on: ubuntu-latest
strategy:
Expand All @@ -20,12 +30,13 @@ jobs:
- 27.2
- 28.1
- 28.2
- 29.4
- snapshot
steps:
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}

- uses: actions/checkout@v2
- name: Run tests
run: make
- uses: actions/checkout@v4
- name: Compile
run: make compile
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
EMACS ?= emacs

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

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

all: compile package-lint clean-elc
all: compile package-lint test clean-elc

package-lint:
${EMACS} -Q --eval ${INIT_PACKAGES} -batch -f package-lint-batch-and-exit ibuffer-vc.el
${EMACS} -Q --eval $(subst PACKAGES,package-lint,${INIT_PACKAGES}) -batch -f package-lint-batch-and-exit ibuffer-vc.el

compile: clean-elc
${EMACS} -Q --eval ${INIT_PACKAGES} -L . -batch -f batch-byte-compile *.el
${EMACS} -Q --eval $(subst PACKAGES,${DEPS},${INIT_PACKAGES}) -L . -batch -f batch-byte-compile *.el

clean-elc:
rm -f f.elc
Expand Down

0 comments on commit 0b2a3d2

Please sign in to comment.