[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/realgud-lldb d693c26 1/3: Try TravisCI
From: |
Stefan Monnier |
Subject: |
[elpa] externals/realgud-lldb d693c26 1/3: Try TravisCI |
Date: |
Mon, 15 Mar 2021 22:23:21 -0400 (EDT) |
branch: externals/realgud-lldb
commit d693c26689555f23a546cfd9e814778706a76f15
Author: rocky <rocky@gnu.org>
Commit: rocky <rocky@gnu.org>
Try TravisCI
---
.gitignore | 1 +
.travis.yml | 17 +++++++++++++++++
Cask | 12 ++++++++++++
cask-install.el | 12 ++++++++++++
run-travis-ci.sh | 21 +++++++++++++++++++++
test/Makefile.am | 13 +++++++------
travis.sh | 24 ++++++++++++++++++++++++
7 files changed, 94 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index ae58d29..57437f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
/*-pkg.el
/*.tar.gz
/.python-version
+/ChangeLog
/README
/aclocal.m4
/autom4te.cache
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..057412c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: emacs-lisp
+sudo: no
+
+env:
+ - EVM_EMACS=emacs-26.2-travis
+# - EVM_EMACS=emacs-26.1-travis
+# - EVM_EMACS=emacs-25.3-travis
+# - EVM_EMACS=emacs-25.2-travis
+
+# Install EVM, version EVM_EMACS
+install:
+ - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw >
travis.sh && source ./travis.sh
+ - evm install $EVM_EMACS --use --skip
+
+# run the tests
+script:
+ - ./run-travis-ci.sh
diff --git a/Cask b/Cask
new file mode 100644
index 0000000..cd45b9d
--- /dev/null
+++ b/Cask
@@ -0,0 +1,12 @@
+(package-file "realgud-lldb.el")
+
+(source gnu)
+(source melpa)
+
+(depends-on "realgud")
+(depends-on "loc-changes")
+(depends-on "load-relative")
+(depends-on "loc-changes")
+
+(development
+ (depends-on "test-simple"))
diff --git a/cask-install.el b/cask-install.el
new file mode 100644
index 0000000..9d964cf
--- /dev/null
+++ b/cask-install.el
@@ -0,0 +1,12 @@
+(require 'cask "~/.cask/cask.el")
+(let*
+ ((parent-dir
+ (if (string-match "test/$" default-directory)
+ (file-name-directory (directory-file-name default-directory))
+ default-directory)))
+ (cask-initialize parent-dir))
+;; There is a bug on Travis where we are getting
+;; "Symbol’s function definition is void: make-mutex"
+;; We'll work around it here
+(if (not (functionp 'make-mutex))
+ (defun make-mutex(&optional name)))
diff --git a/run-travis-ci.sh b/run-travis-ci.sh
new file mode 100755
index 0000000..a17b3f9
--- /dev/null
+++ b/run-travis-ci.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+cd "$(dirname "$0")"
+
+set_default () {
+ eval "
+if [ -z \$$1 ]; then
+ $1=$2
+fi
+"
+}
+
+set_default EMACS "$(which emacs)"
+
+echo "*** Emacs version ***"
+echo "EMACS =" $(which $EMACS)
+$EMACS --version
+echo
+
+cask
+NO_CHECK_EMACS_PACKAGES=1 /bin/bash ./autogen.sh && cd test && make check-cask
diff --git a/test/Makefile.am b/test/Makefile.am
index 972821b..00bf71c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,8 @@
+include $(top_srcdir)/common.mk
+
lisp_files = $(wildcard *.el)
-EXTRA_DIST = $(lisp_files)
lisp_LISP = $(lisp_files)
-include $(top_srcdir)/common.mk
+EXTRA_DIST = $(lisp_files)
PHONY=check test all check-elget test-elget help
@@ -47,8 +48,8 @@ EL_GET_CHECK_FILES = $(notdir $(test_files:.el=.elrun))
#: Run all tests
check: $(CHECK_FILES)
-#: Run all tests via el-get
-check-elget: $(EL_GET_CHECK_FILES)
+#: Run all tests via cask
+check-cask: $(EL_GET_CHECK_FILES)
#: Run all tests with minimum verbosity
check-short:
@@ -61,9 +62,9 @@ check-short-elget:
test-%.run:
(cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load $(@:.run=.el))
-#: Run tests using el-get to specify external Lisp dependencies
+#: Run tests using cask to specify external Lisp dependencies
test-%.elrun:
- (cd $(top_srcdir)/test && EMACSLOADPATH=$(EMACSLOADPATH) $(EMACS)
--batch --no-site-file --no-splash --load ../el-get-install.el --load
$(@:.elrun=.el))
+ (cd $(top_srcdir)/test && $(EMACS) --batch --no-site-file --no-splash
--load ../cask-install.el --load $(@:.elrun=.el))
install-lispLISP: $(lisp_LISP) $(ELCFILES)
diff --git a/travis.sh b/travis.sh
new file mode 100755
index 0000000..b1570c2
--- /dev/null
+++ b/travis.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# This script will setup Evm (Emacs Version Manager) and Cask on
+# Travis to use for Emacs Lisp testing.
+#
+# In .travis.yml, add this:
+#
+# - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw >
x.sh && source ./x.sh
+#
+# Emacs 24.3 is installed in the above script because Cask requires
+# Emacs 24 to be installed. Because of this, when installing other
+# environments in the .travis.yml configuration, use the --skip
+# option, for example:
+#
+# - evm install $EVM_EMACS --use --skip
+
+export PATH="/home/travis/.evm/bin:$PATH"
+export PATH="/home/travis/.cask/bin:$PATH"
+
+git clone https://github.com/rejeep/evm.git /home/travis/.evm
+evm config path /tmp
+evm install emacs-24.3-travis --use --skip
+
+curl -fsSkL https://raw.github.com/cask/cask/master/go | python