• Stars
    star
    166
  • Rank 227,748 (Top 5 %)
  • Language
    Nix
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Emacs installations for continuous integration

Build Status Support me

Emacs installations for continuous integration

This project aims to provide a method for Emacs Lisp authors to easily test their code against a wide variety of Emacs versions. It is used most widely as the basis of the popular setup-emacs GitHub Action.

Goals:

  • Usable without Nix knowledge
  • Clear, simple docs and setup, initially primarily for Travis and Github Actions
  • Binary caching, ie. pre-built executables, via Cachix (a wonderful service!)
  • Both Linux and MacOS support
  • Minimal installations by default, for download speed: no image support, no window-system
  • Allow easy local testing

Status

  • Works for Linux and MacOS (but no binary cache for ARM on either yet, sorry)
  • Official release versions from 23.4 onwards are supported (though not necessarily on all platforms)
  • Emacs development and pre-release snapshot builds are also available
  • Binary caching via Cachix is enabled, and working
  • A Github Action is available for easy integration with your workflows
  • Travis integration is presumably still working but see notes below.

Github Actions usage

The purcell/setup-emacs Github Action is available for easy integration with your Github workflows.

Travis usage

While people were still using Travis for open source, integration worked like this:

language: nix

os:
  - linux
  - osx

env:
  - EMACS_CI=emacs-24-1
  - EMACS_CI=emacs-24-5
  - EMACS_CI=emacs-25-3
  - EMACS_CI=emacs-26-3
  - EMACS_CI=emacs-27-2
  - EMACS_CI=emacs-snapshot

install:
  # The default "emacs" executable on the $PATH will now be the version named by $EMACS_CI
  - bash <(curl https://raw.githubusercontent.com/purcell/nix-emacs-ci/master/travis-install)

script:
  - ... your commands go here ...

This repo no longer actively aims to support Travis.

Low-level Nix usage, e.g. for local testing

With Flakes

There's a flake definition in this repo so (assuming you have flakes enabled in your nix installation) you can easily run any given Emacs, e.g. using:

nix run 'github:purcell/nix-emacs-ci#emacs-28-2' -- -Q

The flake contains the necessary binary cache config, which you may be prompted to authorise.

On MacOS with Apple Silicon and Rosetta installed, you can run the pre-built cached x86_64 Emacsen like this:

nix run --system x86_64-darwin 'github:purcell/nix-emacs-ci#emacs-28-2' -- -Q

Without Flakes

First, ensure you have cachix enabled, to obtain cached binaries:

nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use emacs-ci

If you want to add the cache address and key to your substituters system-wide, use the details on the cache page.

Then, evaluate one of the emacs-* expressions in default.nix. You can do this without first downloading the contents of this repo, e.g. here's how you would add a specific version to your Nix profile:

nix-env -iA emacs-25-2 -f https://github.com/purcell/nix-emacs-ci/archive/master.tar.gz

The above command mutates your user-level profile, so you probably don't want to do that when testing locally. There'll be a nix-shell equivalent of this, in order to run a command inside a transient environment containing a specific Emacs, but I haven't figured that out yet.

About snapshot builds

snapshot builds aim to be a relatively recent commit on the Emacs master branch, and does not automatically give you the very latest Emacs revision available via Git. That would defeat binary caching.

Instead, a scheduled Action runs every week to speculatively update the version: it requires me to click a couple of things, but most weeks this should happen.

What patches are applied to these binaries, and why?

There's a tension between having a CI binary that is easily usable for the majority of testing purposes, and one that faithfully reproduces the known broken behaviour of that version in certain circumstances. Binaries for old Emacs versions "in the wild" will have been built with various old versions of GNUTLS and other libraries, and there is no single way to reproduce all their quirks.

For this project, we are doing the least patching that will allow the older Emacsen to install packages from ELPA over HTTPS using a recent version of GNUTLS. (While older versions used the http ELPA URL anyway, cask uses https unconditionally.) This involves applying patches for the E_AGAIN issue that was fixed in 26.3, plus a patch to let old Emacsen find the system cert store on recent OSX versions.

Additionally, the ELPA package signing key has changed and no longer matches the public key that was bundled with older Emacs releases (25.x), which meant that those releases could not now install ELPA packages with stock settings: package-check-signatures needed to be disabled, or the new public key imported into the user's keychain. To avoid this issue, we bundle the latest public keys into all builds.

Finally, minor patches are applied as necessary to allow very old Emacs versions to compile against newer glibc versions.


💝 Support this project and my other Open Source work via Patreon

💼 LinkedIn profile

✍ sanityinc.com

🐦 @sanityinc

More Repositories

1

emacs.d

An Emacs configuration bundle with batteries included
Emacs Lisp
6,646
star
2

exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Emacs Lisp
1,325
star
3

sqlint

Simple SQL linter supporting ANSI and PostgreSQL syntaxes
Ruby
404
star
4

color-theme-sanityinc-tomorrow

A set of comprehensive Emacs color themes based on Chris Kempson's 'tomorrow' themes
Emacs Lisp
392
star
5

envrc

Emacs support for direnv which operates buffer-locally
Emacs Lisp
252
star
6

page-break-lines

Emacs: display ugly ^L page breaks as tidy horizontal lines
Emacs Lisp
222
star
7

emacs-reformatter

Define commands which run reformatters on the current Emacs buffer
Emacs Lisp
213
star
8

package-lint

A linting library for elisp package metadata
Emacs Lisp
191
star
9

ibuffer-vc

Let Emacs' ibuffer-mode group files by git project etc., and show file state
Emacs Lisp
163
star
10

elisp-slime-nav

Slime-style navigation of Emacs Lisp source with M-. & M-,
Emacs Lisp
148
star
11

whitespace-cleanup-mode

In Emacs, intelligently call whitespace-cleanup on save
Emacs Lisp
118
star
12

setup-emacs

Github action which installs a given Emacs version
Shell
117
star
13

diredfl

Extra Emacs font lock rules for a more colourful dired
Emacs Lisp
115
star
14

ac-slime

Emacs auto-complete plugin for Slime symbols
Emacs Lisp
109
star
15

whole-line-or-region

In Emacs, operate on current line if no region is active
Emacs Lisp
106
star
16

less-css-mode

Emacs mode for LESS CSS (lesscss.org), with support for compile-on-save
Emacs Lisp
101
star
17

disable-mouse

Disable the mouse in Emacs
Emacs Lisp
100
star
18

darcs-to-git

Convert/mirror darcs repos into git repos
Ruby
96
star
19

airspeed

A lightweight Python template engine compatible with Velocity, used in OpenStack
Python
86
star
20

color-theme-sanityinc-solarized

A pair of Emacs color themes based on Ethan Schoonover's 'solarized' theme
Emacs Lisp
80
star
21

default-text-scale

Easily adjust the font size in all Emacs frames
Emacs Lisp
73
star
22

unfill

Functions providing the inverse of Emacs' fill-paragraph and fill-region
Emacs Lisp
72
star
23

jargs

GNU getopt-style command-line argument parser for Java, used in JBoss
Java
64
star
24

ibuffer-projectile

Group buffers in Emacs ibuffer-mode by their projectile root directory
Emacs Lisp
63
star
25

rails-runit

Run Rails reliably as runit services
Shell
43
star
26

paredit-everywhere

Enable some paredit features in non-lisp buffers
Emacs Lisp
38
star
27

flycheck-package

Flycheck checker for elisp package metadata
Emacs Lisp
38
star
28

postgresql-migrations

Simple Schema Migrations for PostgreSQL
PLpgSQL
36
star
29

flymake-easy

Helpers for easily building Emacs flymake checkers
Emacs Lisp
35
star
30

inheritenv

Make emacs temp buffers inherit buffer-local environment variables
Emacs Lisp
35
star
31

emacs-shfmt

Reformat shell script code in Emacs using shfmt
Emacs Lisp
33
star
32

flymake-flycheck

Use any Emacs flycheck checker as a flymake backend
Emacs Lisp
32
star
33

flymake-python-pyflakes

Emacs flymake handler for python using pyflakes
Emacs Lisp
29
star
34

flycheck-ledger

A flychecker for checking ledger files
Emacs Lisp
28
star
35

flymake-ruby

Emacs flymake handler for ruby-mode
Emacs Lisp
24
star
36

ns-auto-titlebar

In Emacs, set the MacOS transparent titlebar to match the current theme
Emacs Lisp
23
star
37

ruby-hash-syntax

In Emacs, toggle ruby hash syntax between classic and 1.9 styles
Emacs Lisp
22
star
38

windswap

Like Emacs's "windmove.el", but swaps buffers while moving
Emacs Lisp
20
star
39

osx-location

Make Emacs watch and respond to changes in geographical location on OS X
Emacs Lisp
19
star
40

flymake-jslint

Emacs flymake syntax-checker for javascript using jslint
Emacs Lisp
18
star
41

flymake-coffee

Emacs flymake handler for CoffeeScript
Emacs Lisp
15
star
42

flymake-php

Emacs flymake syntax-checker for php files
Emacs Lisp
15
star
43

mode-line-bell

Flash the Emacs mode line instead of ringing the bell
Emacs Lisp
15
star
44

adventofcode2016

Advent of Code 2016, in Haskell
Haskell
15
star
45

list-unicode-display

Search for and list unicode characters in Emacs
Emacs Lisp
15
star
46

ac-haskell-process

Haskell completion source for Emacs auto-complete package
Emacs Lisp
15
star
47

servant-elm

WIP: Generate Elm modules which talk to Haskell Servant APIs
Haskell
14
star
48

cl-libify

Update elisp code to use cl-lib instead of cl
Emacs Lisp
12
star
49

flymake-json

Emacs flymake handler for json using jsonlint
Emacs Lisp
11
star
50

emacs-nixpkgs-fmt

Reformat Nix code with nixpkgs-fmt in Emacs
Emacs Lisp
10
star
51

ac-inf-ruby

An Emacs auto-complete source for use in inf-ruby sessions
Emacs Lisp
10
star
52

flymake-shell

Emacs flymake syntax-checker for shell scripts
Emacs Lisp
9
star
53

rosettacode-clojure

My Clojure contributions to Rosettacode
Clojure
8
star
54

skewer-less

Live LESS stylesheet updates from Emacs via skewer-mode
Emacs Lisp
8
star
55

flycheck-relint

Flycheck integration for `relint`, which checks regexps in emacs lisp
Emacs Lisp
7
star
56

flymake-sass

Emacs flymake syntax-checker for sass stylesheets
Emacs Lisp
7
star
57

icfpc2017

2017 ICFP Contest - The Flux Ambassadors
Haskell
7
star
58

elm-life

Conway's Game of Life in Elm
Elm
7
star
59

ivy-smex

Use Ivy completion with Smex command matching
Emacs Lisp
6
star
60

hippie-expand-slime

Plug slime completion into Emacs' "hippie-expand"
Emacs Lisp
6
star
61

git-timemachine

Step through historic versions of git controlled file using everyone's favourite editor
Emacs Lisp
6
star
62

icfpc2015

My solo entry for the 2015 ICFP Contest - http://2015.icfpcontest.org/
Haskell
6
star
63

lively

Live-evaluated emacs lisp snippets
Emacs Lisp
6
star
64

dbdoc

Generate javadoc-style html documentation for a database schema
Python
6
star
65

adventofcode2017

Advent of Code 2017 in Haskell
Haskell
5
star
66

flymake-css

Emacs flymake syntax-checker for css using csslint
Emacs Lisp
5
star
67

company-cmake

Completion back-end for CMake
Emacs Lisp
5
star
68

wordchainsrevenge

Another run at the WordChains kata in haskell
Haskell
4
star
69

with-temp-postgres

Temporarily run postgres against a pre-existing data directory while you run a command
Shell
4
star
70

icfpc2018

2018 ICFP Contest
Haskell
4
star
71

elpa-audit

Handy functions for inspecting and comparing Emas package archives
Emacs Lisp
4
star
72

flymake-haskell-multi

Syntax-check haskell source in Emacs using both ghc and hlint
Emacs Lisp
4
star
73

adventofcode2018

Advent of Code 2018, in Haskell again because yay Haskell
Haskell
4
star
74

flymake-haml

Emacs flymake handler for haml and sass files
Emacs Lisp
4
star
75

redis-memo

Memoize clojure functions using redis as an out-of-process store for cached results
Clojure
4
star
76

dotr

Ruby wrapper for the 'dot' utility from graphviz
Ruby
3
star
77

dot-hammerspoon

My hammerspoon configuration
Lua
3
star
78

haskell-anagrams

A Haskell anagram generator, written for West London Hack Night
Haskell
3
star
79

emacs-docker

WIP: Tools for building docker images that contain emacs versions
Makefile
3
star
80

db_console

Defunct Rails plugin (now merged into Rails as script/dbconsole)
Ruby
3
star
81

gemdocindex

Generate an HTML index of your ruby gem rdocs, like a static 'gem --server'
3
star
82

color-theme-sanityinc

Two pleasant medium-contrast Emacs color themes in light and dark flavours
Emacs Lisp
3
star
83

codejam2016

Haskell solutions for qualification round of codejam 2016
Haskell
3
star
84

netstubs

Stub http and smtp servers, written in Python
Python
3
star
85

mockr

Tiny Ruby mock object library inspired by JMock
Ruby
2
star
86

fleeceminer

A toy crypto miner in ruby
Ruby
2
star
87

purcell

GitHub metadata
2
star
88

flymake-less

Emacs flymake handler for LESS stylesheets
Emacs Lisp
2
star
89

replit-j

Repl.it support for jlang
Nix
2
star
90

jquery.placeholder

Shows ghost text in empty input boxes, suggesting what the user should enter.
JavaScript
2
star
91

vm5294

"5294" Virtual Machine
Haskell
2
star
92

maintenance_server

Rails plugin providing a fallback server for mongrel
Ruby
2
star
93

farsync

A toy rsync-like tool written in ruby
Ruby
2
star
94

markov-chains-hs

A toy Markov Chain text generator in Haskell
Haskell
2
star
95

rsshole

Fetch a bunch of RSS feeds and classify new items (WIP)
Haskell
2
star
96

flymake-hlint

Emacs flymake handler for checking Haskell source code with hlint
Emacs Lisp
2
star
97

adventofcode2020

Advent of Code 2020, in J
J
2
star
98

purescript-life

WIP: purescript port of my Elm version of Conway's Game of Life (https://github.com/purcell/elm-life)
PureScript
2
star
99

adventofcodeteam

A team effort to solve all the Advent of Code challenges with Haskell in 2 days
Haskell
2
star
100

renumber_migrations

Rails plugin for renumbering clashing migrations in a project kept in svn
Ruby
2
star