Commit e2e399cd authored by Raphael Cauderlier's avatar Raphael Cauderlier

[CI] Continuous integration

The CI script does the following:

- lint the `configure` shell scripts using `shellcheck`
- lint the file `` using `org-lint`
- compile the project with Coq v8.8 and Coq v8.9.
parent baa2a13b
- build
stage: build
image: coqorg/${CI_JOB_NAME}
- opam update -y
- sudo apt-get update -y -q
- sudo chown -R coq:coq "$CI_PROJECT_DIR"
- DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -q shellcheck emacs
- shellcheck `find -name 'configure'`
- emacs --batch -l scripts/org-lint-README.el --kill
- opam pin add -k git -y -j ${NJOBS} coq-ott
- opam pin add -k git -y -j ${NJOBS} mi-cho-coq .
extends: .build
extends: .build
;;; org-lint-README ---- This is a simple Emacs script to lint the file
;; Copyright (c) 2019 Nomadic Labs. <>
;; Author: Raphaël Cauderlier
;; Version: 0.1
;; License: MIT
;;; Commentary:
; This is inteded to be used in continuous integration using a command like
; $ emacs --batch -l scripts/org-lint-README.el --kill
;;; Code:
(require 'cl) ; This defines the assert macro
; Configuration of Emacs package manager
(require 'package)
(add-to-list 'package-archives '("org" . "") t)
; Ensure Org-mode is recent enough to provide the org-lint command
(package-install-file "scripts/org-lint-dummy.el")
; Display versions of Emacs and Org-mode
(princ (format "Emacs version: %s\n" (emacs-version)))
(princ (format "Org version: %s\n" (org-version)))
; Lint the README file
(find-file "") ; This opens the file in Org-mode
(assert (not (org-lint))) ; Call the linter and fail if it complains
(provide 'org-lint-README)
;;; org-lint-README ends here
;;; org-lint-dummy.el ---- A dummy package to ensure a recent-enough version of org is installed
;; Copyright (c) 2019 Nomadic Labs. <>
;; Author: Raphaël Cauderlier
;; Version: 0.1
;; License: MIT
;; Package-Requires: ((org "9.0"))
;; Filename: org-lint-dummy.el
;;; Commentary:
; This package can be used to enforce existence of the org-lint
; command that was introduced in Org-mode version 9.0
;;; Code:
(require 'org)
(provide 'org-lint-dummy)
;;; org-lint-dummy.el ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment