CI/Nix: simplify cache config
This commit is contained in:
parent
5f0575737f
commit
526aa1d020
7 changed files with 20 additions and 51 deletions
16
.github/workflows/nix-test.yml
vendored
16
.github/workflows/nix-test.yml
vendored
|
|
@ -20,25 +20,13 @@ jobs:
|
||||||
- name: Restore and save Nix store
|
- name: Restore and save Nix store
|
||||||
uses: nix-community/cache-nix-action@v6
|
uses: nix-community/cache-nix-action@v6
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
# restore and save a cache using this key (per job)
|
||||||
primary-key: nix-${{ runner.os }}
|
primary-key: nix-${{ runner.os }}-${{ github.job }}
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}
|
restore-prefixes-first-match: nix-${{ runner.os }}
|
||||||
# collect garbage until the Nix store size (in bytes) is at most this number
|
# collect garbage until the Nix store size (in bytes) is at most this number
|
||||||
# before trying to save a new cache
|
# before trying to save a new cache
|
||||||
# 1G = 1073741824
|
|
||||||
gc-max-store-size-linux: 5G
|
gc-max-store-size-linux: 5G
|
||||||
# do purge caches
|
|
||||||
purge: true
|
|
||||||
# purge all versions of the cache
|
|
||||||
purge-prefixes: nix-${{ runner.os }}
|
|
||||||
# created more than this number of seconds ago
|
|
||||||
purge-created: 0
|
|
||||||
# or, last accessed more than this number of seconds ago
|
|
||||||
# relative to the start of the `Post Restore and save Nix store` phase
|
|
||||||
purge-last-accessed: 0
|
|
||||||
# except any version with the key that is the same as the `primary-key`
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- uses: cachix/cachix-action@v15
|
- uses: cachix/cachix-action@v15
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
20
.github/workflows/nix-update-inputs.yml
vendored
20
.github/workflows/nix-update-inputs.yml
vendored
|
|
@ -27,25 +27,13 @@ jobs:
|
||||||
- name: Restore and save Nix store
|
- name: Restore and save Nix store
|
||||||
uses: nix-community/cache-nix-action@v6
|
uses: nix-community/cache-nix-action@v6
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
# restore and save a cache using this key (per job)
|
||||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
primary-key: nix-${{ runner.os }}-${{ github.job }}
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
restore-prefixes-first-match: nix-${{ runner.os }}
|
||||||
# collect garbage until the Nix store size (in bytes) is at most this number
|
# collect garbage until the Nix store size (in bytes) is at most this number
|
||||||
# before trying to save a new cache
|
# before trying to save a new cache
|
||||||
# 1G = 1073741824
|
gc-max-store-size-linux: 5G
|
||||||
gc-max-store-size-linux: 1G
|
|
||||||
# do purge caches
|
|
||||||
purge: true
|
|
||||||
# purge all versions of the cache
|
|
||||||
purge-prefixes: nix-${{ runner.os }}-
|
|
||||||
# created more than this number of seconds ago
|
|
||||||
purge-created: 0
|
|
||||||
# or, last accessed more than this number of seconds ago
|
|
||||||
# relative to the start of the `Post Restore and save Nix store` phase
|
|
||||||
purge-last-accessed: 0
|
|
||||||
# except any version with the key that is the same as the `primary-key`
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- name: Update inputs
|
- name: Update inputs
|
||||||
run: nix/update-inputs.sh
|
run: nix/update-inputs.sh
|
||||||
|
|
|
||||||
16
.github/workflows/nix.yml
vendored
16
.github/workflows/nix.yml
vendored
|
|
@ -25,25 +25,13 @@ jobs:
|
||||||
- name: Restore and save Nix store
|
- name: Restore and save Nix store
|
||||||
uses: nix-community/cache-nix-action@v6
|
uses: nix-community/cache-nix-action@v6
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
# restore and save a cache using this key (per job)
|
||||||
primary-key: nix-${{ runner.os }}
|
primary-key: nix-${{ runner.os }}-${{ github.job }}
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}
|
restore-prefixes-first-match: nix-${{ runner.os }}
|
||||||
# collect garbage until the Nix store size (in bytes) is at most this number
|
# collect garbage until the Nix store size (in bytes) is at most this number
|
||||||
# before trying to save a new cache
|
# before trying to save a new cache
|
||||||
# 1G = 1073741824
|
|
||||||
gc-max-store-size-linux: 5G
|
gc-max-store-size-linux: 5G
|
||||||
# do purge caches
|
|
||||||
purge: true
|
|
||||||
# purge all versions of the cache
|
|
||||||
purge-prefixes: nix-${{ runner.os }}
|
|
||||||
# created more than this number of seconds ago
|
|
||||||
purge-created: 0
|
|
||||||
# or, last accessed more than this number of seconds ago
|
|
||||||
# relative to the start of the `Post Restore and save Nix store` phase
|
|
||||||
purge-last-accessed: 0
|
|
||||||
# except any version with the key that is the same as the `primary-key`
|
|
||||||
purge-primary-key: never
|
|
||||||
|
|
||||||
- uses: cachix/cachix-action@v15
|
- uses: cachix/cachix-action@v15
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,6 @@
|
||||||
(pkgsFor.${system})
|
(pkgsFor.${system})
|
||||||
# hyprland-packages
|
# hyprland-packages
|
||||||
hyprland
|
hyprland
|
||||||
hyprland-with-hyprtester
|
|
||||||
hyprland-unwrapped
|
hyprland-unwrapped
|
||||||
# hyprland-extras
|
# hyprland-extras
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@
|
||||||
commit,
|
commit,
|
||||||
revCount,
|
revCount,
|
||||||
date,
|
date,
|
||||||
withHyprtester ? false,
|
|
||||||
# deprecated flags
|
# deprecated flags
|
||||||
enableNvidiaPatches ? false,
|
enableNvidiaPatches ? false,
|
||||||
nvidiaPatches ? false,
|
nvidiaPatches ? false,
|
||||||
hidpiXWayland ? false,
|
hidpiXWayland ? false,
|
||||||
legacyRenderer ? false,
|
legacyRenderer ? false,
|
||||||
|
withHyprtester ? false,
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) foldl' readFile;
|
inherit (builtins) foldl' readFile;
|
||||||
inherit (lib.asserts) assertMsg;
|
inherit (lib.asserts) assertMsg;
|
||||||
|
|
@ -70,6 +70,7 @@ in
|
||||||
assert assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
assert assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
||||||
assert assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hypr.land/Configuring/XWayland";
|
assert assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hypr.land/Configuring/XWayland";
|
||||||
assert assertMsg (!legacyRenderer) "The option `legacyRenderer` has been removed. Legacy renderer is no longer supported.";
|
assert assertMsg (!legacyRenderer) "The option `legacyRenderer` has been removed. Legacy renderer is no longer supported.";
|
||||||
|
assert assertMsg (!withHyprtester) "The option `withHyprtester` has been removed. Hyprtester is always built now.";
|
||||||
customStdenv.mkDerivation (finalAttrs: {
|
customStdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hyprland${optionalString debug "-debug"}";
|
pname = "hyprland${optionalString debug "-debug"}";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
@ -85,6 +86,7 @@ in
|
||||||
../assets/install
|
../assets/install
|
||||||
../hyprctl
|
../hyprctl
|
||||||
../hyprland.pc.in
|
../hyprland.pc.in
|
||||||
|
../hyprtester
|
||||||
../LICENSE
|
../LICENSE
|
||||||
../protocols
|
../protocols
|
||||||
../src
|
../src
|
||||||
|
|
@ -94,7 +96,6 @@ in
|
||||||
(fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example)
|
(fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example)
|
||||||
(fs.fileFilter (file: file.hasExt "sh") ../scripts)
|
(fs.fileFilter (file: file.hasExt "sh") ../scripts)
|
||||||
(fs.fileFilter (file: file.name == "CMakeLists.txt") ../.)
|
(fs.fileFilter (file: file.name == "CMakeLists.txt") ../.)
|
||||||
(optional withHyprtester ../hyprtester)
|
|
||||||
]));
|
]));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -189,7 +190,7 @@ in
|
||||||
"NO_UWSM" = true;
|
"NO_UWSM" = true;
|
||||||
"NO_HYPRPM" = true;
|
"NO_HYPRPM" = true;
|
||||||
"TRACY_ENABLE" = false;
|
"TRACY_ENABLE" = false;
|
||||||
"BUILD_HYPRTESTER" = withHyprtester;
|
"BUILD_HYPRTESTER" = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
|
@ -208,7 +209,7 @@ in
|
||||||
pkgconf
|
pkgconf
|
||||||
]}
|
]}
|
||||||
''}
|
''}
|
||||||
'' + optionalString withHyprtester ''
|
|
||||||
install hyprtester/pointer-warp -t $out/bin
|
install hyprtester/pointer-warp -t $out/bin
|
||||||
install hyprtester/pointer-scroll -t $out/bin
|
install hyprtester/pointer-scroll -t $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,12 @@ in {
|
||||||
};
|
};
|
||||||
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
||||||
|
|
||||||
hyprland-with-hyprtester = final.hyprland.override {withHyprtester = true;};
|
hyprland-with-hyprtester =
|
||||||
|
builtins.trace ''
|
||||||
|
hyprland-with-hyprtester was removed. Please use the hyprland package.
|
||||||
|
Hyprtester is always built now.
|
||||||
|
''
|
||||||
|
final.hyprland;
|
||||||
|
|
||||||
# deprecated packages
|
# deprecated packages
|
||||||
hyprland-legacy-renderer =
|
hyprland-legacy-renderer =
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
inputs: pkgs: let
|
inputs: pkgs: let
|
||||||
flake = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
flake = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
hyprland = flake.hyprland-with-hyprtester;
|
hyprland = flake.hyprland;
|
||||||
in {
|
in {
|
||||||
tests = pkgs.testers.runNixOSTest {
|
tests = pkgs.testers.runNixOSTest {
|
||||||
name = "hyprland-tests";
|
name = "hyprland-tests";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue