summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVedang Manerikar <ved.manerikar@gmail.com>2021-04-11 19:25:21 +0530
committerVedang Manerikar <ved.manerikar@gmail.com>2021-04-11 19:33:25 +0530
commit6ddfda8b0873d6a3878365b5f2fd1ba37199d4c3 (patch)
tree48ba81128edff3ee9215c6acbddc27adcb22b1e3
parent35e12b0813e86c2e15793e75a1f8649fe7ab909e (diff)
(First Cut) Add a CircleCI config file for running tests
-rw-r--r--.circleci/config.yml47
-rw-r--r--Makefile12
2 files changed, 53 insertions, 6 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..1f143fc
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,47 @@
+version: 2.1
+
+# Default actions to perform on each Emacs version
+default: &default-steps
+ steps:
+ - checkout
+ - run: apt-get update && apt-get install -y gcc g++ make automake autoconf libpng-dev libz-dev libpoppler-glib-dev libpoppler-private-dev
+ - run: cask upgrade-cask || true
+ - run: emacs --version
+ - run: cask --version
+ - run: cask install
+ - run: make test
+
+# Enumerated list of Emacs versions
+jobs:
+ test-emacs-25:
+ docker:
+ - image: silex/emacs:25-ci-cask
+ entrypoint: bash
+ <<: *default-steps
+
+ test-emacs-26:
+ docker:
+ - image: silex/emacs:26-ci-cask
+ entrypoint: bash
+ <<: *default-steps
+
+ test-emacs-27:
+ docker:
+ - image: silex/emacs:27-ci-cask
+ entrypoint: bash
+ <<: *default-steps
+
+ test-emacs-master:
+ docker:
+ - image: silex/emacs:master-ci-cask
+ entrypoint: bash
+ <<: *default-steps
+
+workflows:
+ version: 2
+ ci-test-matrix:
+ jobs:
+ - test-emacs-25
+ - test-emacs-26
+ - test-emacs-27
+ - test-emacs-master
diff --git a/Makefile b/Makefile
index 1b50fee..b206e8e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-
+CASK = cask
EMACS ?= emacs
# Handle the mess when inside Emacs.
unexport INSIDE_EMACS #cask not like this.
@@ -15,21 +15,21 @@ version=$(shell sed -ne 's/^;\+ *Version: *\([0-9.]\)/\1/p' lisp/pdf-tools.el)
pkgname=pdf-tools-$(version)
pkgfile=$(pkgname).tar
-.PHONY: all clean distclean bytecompile test check melpa cask-install
+.PHONY: all clean distclean bytecompile test check melpa
all: $(pkgfile)
# Create a elpa package including the server
$(pkgfile): .cask/$(emacs_version) server/epdfinfo lisp/*.el
- cask package .
+ $(CASK) package .
# Compile the Lisp sources
bytecompile: .cask/$(emacs_version)
- cask exec $(emacs) --batch -L lisp -f batch-byte-compile lisp/*.el
+ $(CASK) exec $(emacs) --batch -L lisp -f batch-byte-compile lisp/*.el
# Run ERT tests
test: all
- PACKAGE_TAR=$(pkgfile) cask exec ert-runner
+ PACKAGE_TAR=$(pkgfile) $(CASK) exec ert-runner
check: test
@@ -41,7 +41,7 @@ test-all: test test-autobuild
# Init cask
.cask/$(emacs_version):
- cask install
+ $(CASK) install
# Run the autobuild script (installing depends and compiling)
autobuild: