CI: write to Cachix
This is only a starting point. For this to be more useful, we need to build for multiple Emacsen. But I want to get a baseline for the size of the closure first (as well as confirming it works in the first place).
This commit is contained in:
parent
b7b1a944d9
commit
a40637115a
2 changed files with 24 additions and 0 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -66,6 +66,21 @@ jobs:
|
||||||
restore-keys: nix-gitv3-cache-
|
restore-keys: nix-gitv3-cache-
|
||||||
- name: nix flake check
|
- name: nix flake check
|
||||||
run: nix flake check -L --show-trace
|
run: nix flake check -L --show-trace
|
||||||
|
- name: Build packages for Cachix
|
||||||
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||||
|
run: nix build .#cachix-packages -L
|
||||||
|
# Intentionally install Cachix late: build artifacts are cached by Magic
|
||||||
|
# Nix Cache, only the runtime closure of cachix-packages goes to the
|
||||||
|
# public Cachix cache.
|
||||||
|
- name: Install Cachix
|
||||||
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||||
|
uses: cachix/cachix-action@v14
|
||||||
|
with:
|
||||||
|
name: doom-emacs-unstraightened
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Push to Cachix
|
||||||
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||||
|
run: readlink result | cachix push doom-emacs-unstraightened
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
if: github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.updateFlakeLock )
|
if: github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.updateFlakeLock )
|
||||||
run: git push
|
run: git push
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,15 @@
|
||||||
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
|
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
|
||||||
profileName = "";
|
profileName = "";
|
||||||
}).doomEmacs;
|
}).doomEmacs;
|
||||||
|
# TODO: cache more packages, cache for more Emacsen.
|
||||||
|
cachix-packages = pkgs.linkFarm "unstraightened-cachix-packages" {
|
||||||
|
full-emacs29 = (doomFromPackages pkgs {
|
||||||
|
emacs = pkgs.emacs29;
|
||||||
|
doomDir = ./doomdirs/minimal;
|
||||||
|
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
|
||||||
|
full = true;
|
||||||
|
}).doomEmacs;
|
||||||
|
};
|
||||||
});
|
});
|
||||||
overlays.default = final: prev: {
|
overlays.default = final: prev: {
|
||||||
doomEmacs = args: (doomFromPackages final args).doomEmacs;
|
doomEmacs = args: (doomFromPackages final args).doomEmacs;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue