[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode f6fd97b 07/74: Setup Travis CI builds
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode f6fd97b 07/74: Setup Travis CI builds |
Date: |
Thu, 9 May 2019 08:27:43 -0400 (EDT) |
branch: externals/bnf-mode
commit f6fd97bef8efc19e0989768ed8433fefe389cc2a
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Setup Travis CI builds
---
.elpaignore | 5 +++
.ert-runner | 3 ++
.gitignore | 10 ++++++
.travis.yml | 79 +++++++++++++++++++++++++++++++++++++++++++++
Cask | 15 +++++++++
Makefile | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
README.org | 28 ++++++++--------
7 files changed, 230 insertions(+), 14 deletions(-)
diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 0000000..dcfa152
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1,5 @@
+.travis.yml
+.ert-runner
+.gitignore
+Makefile
+test
diff --git a/.ert-runner b/.ert-runner
new file mode 100644
index 0000000..6984d63
--- /dev/null
+++ b/.ert-runner
@@ -0,0 +1,3 @@
+-L .
+--quiet
+--no-win
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ff957d8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# Please do not use this ignore file to define platform specific files.
+#
+# For these purposes create a global .gitignore file, which is a list of rules
+# for ignoring files in every Git repository on your computer.
+#
+# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
+
+*~
+*.elc
+.cask/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..391a1d7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,79 @@
+# Copyright (C) 2017-2019 Serghei Iakovlev
+#
+# This file is not part of GNU Emacs.
+#
+# License
+#
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+language: emacs-lisp
+
+# Cache stable Emacs binaries, packages and Cask
+cache:
+ apt: true
+ timeout: 604800
+ directories:
+ - "$HOME/emacs"
+ # Cache BNF Mode dependencies
+ - ".cask/"
+ # Cache Cask bootstrap dependencies
+ - "$HOME/.emacs.d/.cask"
+
+# Allow Emacs snapshot builds to fail and don't wait for it
+matrix:
+ fast_finish: true
+ allow_failures:
+ - env: EMACS_VERSION=git-snapshot
+
+git:
+ depth: 1
+
+env:
+ matrix:
+ - EMACS_VERSION=24.3
+ - EMACS_VERSION=24.4
+ - EMACS_VERSION=24.5
+ - EMACS_VERSION=25.1
+ - EMACS_VERSION=25.2
+ - EMACS_VERSION=25.3
+ - EMACS_VERSION=26.1
+ - EMACS_VERSION=git-snapshot
+ global:
+ - PATH="$HOME/bin:$HOME/.cask/bin:$HOME/.evm/bin:$PATH"
+
+before_install:
+ # Setup Emacs Version Manager
+ - git clone -q --depth=1 https://github.com/rejeep/evm.git $HOME/.evm
+ - evm config path /tmp
+
+install:
+ # Install Emacs (according to $EMACS_VERSION) and Cask
+ - evm install emacs-$EMACS_VERSION-travis --use --skip
+ - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+before_script:
+ # Configure $EMACS_MAJOR_VERSION
+ - EMACS_MAJOR_VERSION="$(echo $EMACS_VERSION | cut -d '.' -f 1)"
+
+script:
+ - make help
+ - make init
+ # The 'checkdoc-file' present on Emacs >= 25.1
+ - '[[ "$EMACS_MAJOR_VERSION" = "24" ]] || make checkdoc'
+ # - make test
+
+notifications:
+ email: false
diff --git a/Cask b/Cask
new file mode 100644
index 0000000..78bddd4
--- /dev/null
+++ b/Cask
@@ -0,0 +1,15 @@
+;; -*- mode: emacs-lisp -*-
+
+(source gnu)
+(source melpa)
+
+(package-file "bnf-mode.el")
+
+(files "*.el")
+
+(development
+ (depends-on "f")
+ (depends-on "ert-x")
+ (depends-on "cl-lib")
+ (depends-on "ert-runner")
+ (depends-on "undercover"))
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..466a264
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,104 @@
+# Copyright (C) 2017-2019 Serghei Iakovlev
+#
+# This file is not part of GNU Emacs.
+#
+# License
+#
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 3
+# of the License, or (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+SHELL := $(shell which bash)
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+EMACS = emacs
+CASK = cask
+EMACSFLAGS ?=
+TESTFLAGS ?=
+PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
+
+# File lists
+SRCS = bnf-mode.el
+OBJS = $(SRCS:.el=.elc)
+
+.SILENT: ; # no need for @
+.ONESHELL: ; # recipes execute in same shell
+.NOTPARALLEL: ; # wait for this target to finish
+.EXPORT_ALL_VARIABLES: ; # send all vars to shell
+Makefile: ; # skip prerequisite discovery
+
+# Run make help by default
+.DEFAULT_GOAL = help
+
+# Internal variables
+EMACSBATCH = $(EMACS) -Q --batch -L . $(EMACSFLAGS)
+RUNEMACS =
+
+# Program availability
+HAVE_CASK := $(shell sh -c "command -v $(CASK)")
+ifndef HAVE_CASK
+$(warning "$(CASK) is not available. Please run make help")
+RUNEMACS = $(EMACSBATCH)
+else
+RUNEMACS = $(CASK) exec $(EMACSBATCH)
+endif
+
+%.elc: %.el $(PKGDIR)
+ $(RUNEMACS) -f batch-byte-compile $<
+
+$(PKGDIR): Cask
+ $(CASK) install
+ touch $(PKGDIR)
+
+# Public targets
+
+.PHONY: .title
+.title:
+ $(info BNF Mode $(shell cat $(ROOT_DIR)/$(SRCS) | grep ";; Version:" |
awk -F': ' '{print $$2}'))
+ $(info )
+
+.PHONY: init
+init: $(PKGDIR)
+
+.PHONY: checkdoc
+checkdoc:
+ $(EMACSBATCH) --eval '(checkdoc-file "$(SRCS)")'
+
+.PHONY: build
+build: $(OBJS)
+
+.PHONY: test
+test:
+ $(CASK) exec ert-runner $(TESTFLAGS)
+
+.PHONY: clean
+clean:
+ $(CASK) clean-elc
+
+.PHONY: help
+help: .title
+ echo 'Run `make init` first to install and update all local
dependencies.'
+ echo ''
+ echo 'Available targets:'
+ echo ' help: Show this help and exit'
+ echo ' init: Initialise the project (has to be launched first)'
+ echo ' checkdoc: Checks BNF Mode code for errors in documentation'
+ echo ' build: Byte compile BNF Mode package'
+ echo ' test: Run the non-interactive unit test suite'
+ echo ' clean: Remove all byte compiled Elisp files'
+ echo ''
+ echo 'Available programs:'
+ echo ' $(CASK): $(if $(HAVE_CASK),yes,no)'
+ echo ''
+ echo 'You need $(CASK) to develop BNF Mode. See
http://cask.readthedocs.io/ for more.'
+ echo ''
diff --git a/README.org b/README.org
index db20db4..7f8f2d0 100644
--- a/README.org
+++ b/README.org
@@ -22,7 +22,7 @@ BNF Mode with older versions of Emacs will most like not be
addressed.
The master of all the material is the Git repository at
https://github.com/sergeyklay/bnf-mode .
-**NOTE:** The ~master~ branch will always contain the latest unstable version.
+NOTE: The ~master~ branch will always contain the latest unstable version.
If you wish to check older versions or formal, tagged release, please switch
to the relevant [[https://github.com/sergeyklay/bnf-mode/tags][tag]].
@@ -39,18 +39,18 @@ TODO
1. Download ~bnf-mode.el~
2. Put the file in your Elisp common folder like ~$HOME/.emacs.d/lisp/~
3. Then you can include like this:
-#+begin_src emacs-lisp
-(add-to-list 'load-path
- (expand-file-name "lisp" user-emacs-directory))
-#+end_src
+ #+begin_src emacs-lisp
+ (add-to-list 'load-path
+ (expand-file-name "lisp" user-emacs-directory))
+ #+end_src
4. Add /either/ of the two following lines to your initialization file.
- The first only loads BNF Mode when necessary, the 2nd always during startup
- of GNU Emacs.
-#+begin_src emacs-lisp
-(autoload 'bnf-mode "bnf-mode" nil t)
-;; OR
-(require 'zephir-mode)
-#+end_src
+ The first only loads BNF Mode when necessary, the 2nd always during startup
+ of GNU Emacs.
+ #+begin_src emacs-lisp
+ (autoload 'bnf-mode "bnf-mode" nil t)
+ ;; OR
+ (require 'zephir-mode)
+ #+end_src
5. Optionally byte compile ~bnf-mode.el~ for faster startup: ~M-x byte-compile~
** Usage
@@ -74,8 +74,8 @@ To see what has changed in recent versions of BNF Mode, see
the [[https://github
** External Links
-- [[https://tools.ietf.org/html/rfc5234][{RFC 5234} Augmented BNF for Syntax
Specifications: ABNF]]
-- [[https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form][{Wikipedia}
Backus–Naur form]]
+- [[https://tools.ietf.org/html/rfc5234][RFC 5234: Augmented BNF for Syntax
Specifications: ABNF]]
+- [[https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form][Wikipedia:
Backus–Naur form]]
** License
- [elpa] branch externals/bnf-mode created (now a4ca649), Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode cecdb79 01/74: Initial commit, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f100f00 04/74: Initial font locking, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f0a3cd7 03/74: Add CHANGELOG file, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode d3a7059 08/74: Added change log, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode aa8e9af 12/74: Initial test case, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode d50ded2 13/74: Amended tests, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1d8c1e7 14/74: Update change log [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7e37702 25/74: Correct BNF description [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f6fd97b 07/74: Setup Travis CI builds,
Stefan Monnier <=
- [elpa] externals/bnf-mode 246a24f 22/74: Bump version, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3e48f65 27/74: BNF has no strings. Treat ' and " as a symbols, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a7ea867 32/74: Correct documentation, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1ad5de5 37/74: Amended installation methods, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode b18b10c 05/74: Implemented font locking, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 388206f 09/74: Correct copyright date, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3beded6 15/74: Rule names are case insensitive. Added test., Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode af8cf6d 18/74: Correct change log [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode fd83621 20/74: Bump version, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f917836 23/74: Change default goal for make, Stefan Monnier, 2019/05/09