refactor(wpcarro/emacs): Drop meta.ci.extraSteps
...in favor of `meta.targets = [ "check" ]`. Change-Id: I08b035b7d7bbe5ef4eab10a9f55481048c67330a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5104 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
This commit is contained in:
parent
4b8998c9c8
commit
45da3bce86
4 changed files with 27 additions and 31 deletions
|
@ -225,8 +225,9 @@
|
||||||
|
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:config
|
:config
|
||||||
(setq yas-snippet-dirs (list (f-join user-emacs-directory "snippets")))
|
(unless constants-ci?
|
||||||
(yas-global-mode 1))
|
(setq yas-snippet-dirs (list (f-join user-emacs-directory "snippets")))
|
||||||
|
(yas-global-mode 1)))
|
||||||
|
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:config
|
:config
|
||||||
|
|
|
@ -110,16 +110,17 @@
|
||||||
(use-package ivy-prescient
|
(use-package ivy-prescient
|
||||||
:config
|
:config
|
||||||
(ivy-prescient-mode 1)
|
(ivy-prescient-mode 1)
|
||||||
(prescient-persist-mode 1))
|
(unless constants-ci?
|
||||||
|
(prescient-persist-mode 1)))
|
||||||
|
|
||||||
(use-package ivy-pass)
|
(use-package ivy-pass)
|
||||||
|
|
||||||
;; all-the-icons
|
;; all-the-icons
|
||||||
(use-package all-the-icons
|
(use-package all-the-icons
|
||||||
:config
|
:config
|
||||||
(when (not constants-ci?)
|
(unless (or constants-ci?
|
||||||
(unless (f-exists? "~/.local/share/fonts/all-the-icons.ttf")
|
(f-exists? "~/.local/share/fonts/all-the-icons.ttf"))
|
||||||
(all-the-icons-install-fonts t))))
|
(all-the-icons-install-fonts t)))
|
||||||
|
|
||||||
;; icons for Ivy
|
;; icons for Ivy
|
||||||
(use-package all-the-icons-ivy
|
(use-package all-the-icons-ivy
|
||||||
|
|
|
@ -40,5 +40,5 @@
|
||||||
(message "Encountered warnings in *Warnings* buffer: %s" (buffer-string)))
|
(message "Encountered warnings in *Warnings* buffer: %s" (buffer-string)))
|
||||||
(kill-emacs 1)))
|
(kill-emacs 1)))
|
||||||
|
|
||||||
(message "Successfully init'd Emacs without encountering errors or warnings!")
|
(message "Successfully initialized Emacs without errors or warnings!")
|
||||||
(kill-emacs 0)
|
(kill-emacs 0)
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
inherit (builtins) path;
|
inherit (builtins) path;
|
||||||
inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27;
|
inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27;
|
||||||
inherit (depot.users) wpcarro;
|
inherit (depot.users) wpcarro;
|
||||||
inherit (pkgs) writeShellScript writeShellScriptBin;
|
inherit (pkgs) runCommand writeShellScriptBin;
|
||||||
inherit (lib) mapAttrsToList;
|
inherit (lib) mapAttrsToList;
|
||||||
inherit (lib.strings) concatStringsSep makeBinPath;
|
inherit (lib.strings) concatStringsSep makeBinPath;
|
||||||
|
|
||||||
|
@ -165,20 +165,6 @@ let
|
||||||
--load ${initEl} \
|
--load ${initEl} \
|
||||||
"$@"
|
"$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# I need this to start my Emacs from CI without the call to
|
|
||||||
# `--load ${initEl}`.
|
|
||||||
runScript = script: writeShellScript "run-emacs-script" ''
|
|
||||||
export PATH="${emacsBinPath}:$PATH"
|
|
||||||
export EMACSLOADPATH="${loadPath}"
|
|
||||||
exec ${wpcarrosEmacs}/bin/emacs \
|
|
||||||
--no-site-file \
|
|
||||||
--no-site-lisp \
|
|
||||||
--no-init-file \
|
|
||||||
--script ${script} \
|
|
||||||
"$@"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
inherit withEmacsPath;
|
inherit withEmacsPath;
|
||||||
|
|
||||||
|
@ -186,13 +172,21 @@ in {
|
||||||
emacsBin = "${wpcarrosEmacs}/bin/emacs";
|
emacsBin = "${wpcarrosEmacs}/bin/emacs";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
# Script that asserts my Emacs can initialize without warnings or errors.
|
||||||
targets = [ "nixos" ];
|
check = runCommand "check-emacs" {} ''
|
||||||
extraSteps = [
|
# Even though Buildkite defines this, I'd still like still be able to test
|
||||||
{
|
# this locally without depending on my ability to remember to set CI=true.
|
||||||
label = ":gnu: initialize Emacs";
|
export CI=true
|
||||||
command = "${runScript ./ci.el} ${./.emacs.d/init.el}";
|
export PATH="${emacsBinPath}:$PATH"
|
||||||
}
|
export EMACSLOADPATH="${loadPath}"
|
||||||
];
|
${wpcarrosEmacs}/bin/emacs \
|
||||||
};
|
--no-site-file \
|
||||||
|
--no-site-lisp \
|
||||||
|
--no-init-file \
|
||||||
|
--script ${./ci.el} \
|
||||||
|
${./.emacs.d/init.el} && \
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta.targets = [ "nixos" "check" ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue