mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2025-10-29 03:23:43 +00:00
CI/Nix: add cache-nix-action
Use nixbuild/nix-quick-install-action which pairs well with nix-community/cache-nix-action. Should help with build times by reducing the number of packages needing to be re-downloaded on each run. Parameters are taken from https://github.com/nix-community/cache-nix-action and may be tweaked later.
This commit is contained in:
parent
8844ac1336
commit
400308fc4f
38
.github/workflows/nix-build.yaml
vendored
38
.github/workflows/nix-build.yaml
vendored
@ -1,15 +1,33 @@
|
||||
name: Build xdph (Nix)
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
'on':
|
||||
- push
|
||||
- pull_request
|
||||
- workflow_dispatch
|
||||
jobs:
|
||||
nix:
|
||||
name: "Build"
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- uses: cachix/install-nix-action@v27
|
||||
|
||||
- name: Build xdg-desktop-portal-hyprland
|
||||
run: nix build --print-build-logs --extra-substituters "https://hyprland.cachix.org"
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: nixbuild/nix-quick-install-action@v31
|
||||
with:
|
||||
nix_conf: |
|
||||
keep-env-derivations = true
|
||||
keep-outputs = true
|
||||
- name: Restore and save Nix store
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
with:
|
||||
primary-key: 'nix-${{ runner.os }}-${{ hashFiles(''**/*.nix'', ''**/flake.lock'') }}'
|
||||
restore-prefixes-first-match: 'nix-${{ runner.os }}-'
|
||||
gc-max-store-size-linux: 1G
|
||||
purge: true
|
||||
purge-prefixes: 'nix-${{ runner.os }}-'
|
||||
purge-created: 0
|
||||
purge-last-accessed: 0
|
||||
purge-primary-key: never
|
||||
- name: Build xdg-desktop-portal-hyprland
|
||||
run: >-
|
||||
nix build --print-build-logs --extra-substituters
|
||||
"https://hyprland.cachix.org"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user