Skip to content

Commit

Permalink
Merge 78817b4 into 268a598
Browse files Browse the repository at this point in the history
  • Loading branch information
gracjan committed Aug 18, 2016
2 parents 268a598 + 78817b4 commit 45e0221
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ env:
- TARGET=emacs24
- TARGET=emacs-snapshot
- TARGET=deploy-manual
- TARGET=check-external
global:
- secure: "ejv1+ub/v+Hm/23fhp4zLAHT3HiCG+YdDHai57LDe4LfEZCeGz4i/6LazbPbwm58v2YuKvMcdNshebc1s4A293ARJryPyFfW/8kEe+3hQ+cDxunNdHfqcS8SyhcDG0mrv7dqiVAtMJqB8qZb0c161KeEM8nyhC0wyQ+EZ5qJnzM="

matrix:
allow_failures:
- env: TARGET=emacs-snapshot
- env: TARGET=check-external

install: |
case "$TARGET" in
Expand All @@ -29,6 +31,11 @@ install: |
sudo apt-get update &&
sudo apt-get install --no-install-suggests --no-install-recommends --force-yes texinfo emacs24-nox;
;;
check-external)
sudo add-apt-repository -y ppa:andreas-h/emacs &&
sudo apt-get update &&
sudo apt-get install --no-install-suggests --no-install-recommends --force-yes emacs24;
;;
*)
esac
Expand All @@ -43,6 +50,9 @@ script: |
deploy-manual)
EMACS=emacs24 make deploy-manual;
;;
check-external)
EMACS=emacs24 make check-external;
;;
*)
esac
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,8 @@ $(AUTOLOADS): $(ELFILES)
-f batch-update-autoloads "."
# check if autoloads will really load
$(BATCH) -l "$@"

check-external : check-emacs-version $(AUTOLOADS)
$(BATCH) -l tests/haskell-external.el \
-f haskell-check-external-batch-and-exit
@echo "external packages okay"
36 changes: 36 additions & 0 deletions tests/haskell-external.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
;; haskell-check-external.el --- Test if packages depending on haskell-mode install okay -*- lexical-binding: t; -*-

(require 'package)
(require 'bytecomp)

(defun haskell-check-external-batch-and-exit ()
"Check if packages depending on haskell-mode bytecompile.
Haskell Mode should not break packages that depend on it and this
function checks if officially released versions still compile."

(let ((byte-compile-error-on-warn t)
;; where to install temporary packages
(package-user-dir (concat command-line-default-directory "/external/elpa"))
;; use haskell-mode directly from sources, it takes priority
;; over haskell-mode in packages. note that this works from
;; Emacs 24.4 onward, there is something wrong about this
;; variable in Emacs 24.3
(package-directory-list (list command-line-default-directory))
;; packages depending on haskell-mode are in melpa
(package-archives (cons '("melpa" . "http://melpa.milkbox.net/packages/") package-archives)))

(unwind-protect
(progn
(make-directory "external")

;; We aren't really able to depend on errors and warnings in
;; bytecompilation as there are many packages that are very
;; inconsistent about following elisp best practices.
(package-initialize)
(package-refresh-contents)
(package-install 'flycheck-haskell)
(package-install 'flycheck-stack)
(package-install 'ghc)
(package-install 'intero))
(delete-directory "external" t))))

0 comments on commit 45e0221

Please sign in to comment.