Skip to content

Commit

Permalink
Compile files individually in CI
Browse files Browse the repository at this point in the history
We just sprinkle some eval-when-compiles around for older Emacs.  We can remove
them when the CI no longer supports Emacs 25.1.
  • Loading branch information
bcc32 committed Jul 6, 2024
1 parent e1a9b8e commit e21aee9
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Byte compilation
run: emacs --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 26))" -L . --batch -f batch-byte-compile ./*.el
- name: Tests
run: nix shell ${{ matrix.ledger_version || 'nixpkgs#ledger' }} --print-build-logs -c ./makem.sh test -vv --compile-batch
run: nix shell ${{ matrix.ledger_version || 'nixpkgs#ledger' }} --print-build-logs -c ./makem.sh test -vv
# This is currently for information only, since a lot of docstrings need fixing up
- name: Checkdoc
run: make lint-checkdoc || true
Expand Down
2 changes: 2 additions & 0 deletions ledger-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

;;; Code:

(eval-when-compile
(require 'subr-x)) ;for `when-let' in Emacs <26
(require 'ledger-regex)
(require 'org)
(require 'ledger-commodities)
Expand Down
2 changes: 2 additions & 0 deletions ledger-occur.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
;;; Code:

(require 'cl-lib)
(eval-when-compile
(require 'subr-x)) ;for `when-let' in Emacs <26
(require 'ledger-navigate)

(defconst ledger-occur-overlay-property-name 'ledger-occur-custom-buffer-grep)
Expand Down
2 changes: 2 additions & 0 deletions ledger-post.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
;;; Commentary:
;; Utility functions for dealing with postings.

(eval-when-compile
(require 'subr-x)) ;for `when-let', `string-empty-p', `string-trim' in Emacs <26
(require 'ledger-regex)
(require 'ledger-navigate)

Expand Down
2 changes: 2 additions & 0 deletions ledger-reconcile.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

;;; Code:

(eval-when-compile
(require 'subr-x)) ;`if-let', `when-let' in Emacs <26
(require 'easymenu)
(require 'ledger-init)

Expand Down
2 changes: 2 additions & 0 deletions ledger-xact.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

;;; Code:

(eval-when-compile
(require 'subr-x)) ;`if-let', `when-let' in Emacs <26
(require 'eshell)
(require 'ledger-regex)
(require 'ledger-navigate)
Expand Down

0 comments on commit e21aee9

Please sign in to comment.