nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci/eval: reduce closure size (#431769)

authored by

Wolfgang Walther and committed by
GitHub
92efecab 171d0c7c

+19 -17
+2 -1
ci/eval/compare/default.nix
··· 122 122 in 123 123 runCommand "compare" 124 124 { 125 - nativeBuildInputs = [ 125 + # Don't depend on -dev outputs to reduce closure size for CI. 126 + nativeBuildInputs = map lib.getBin [ 126 127 jq 127 128 (python3.withPackages ( 128 129 ps: with ps; [
+17 -16
ci/eval/default.nix
··· 14 14 runCommand, 15 15 writeShellScript, 16 16 symlinkJoin, 17 - time, 18 - procps, 19 - nix, 17 + busybox, 20 18 jq, 19 + nix, 21 20 }: 22 21 23 22 let ··· 47 48 runCommand "attrpaths-superset.json" 48 49 { 49 50 src = nixpkgs; 50 - nativeBuildInputs = [ 51 + # Don't depend on -dev outputs to reduce closure size for CI. 52 + nativeBuildInputs = map lib.getBin [ 53 + busybox 51 54 nix 52 - time 53 55 ]; 54 56 } 55 57 '' ··· 72 72 # The system to evaluate. 73 73 # Note that this is intentionally not called `system`, 74 74 # because `--argstr system` would only be passed to the ci/default.nix file! 75 - evalSystem, 75 + evalSystem ? builtins.currentSystem, 76 76 # The path to the `paths.json` file from `attrpathsSuperset` 77 77 attrpathFile ? "${attrpathsSuperset { inherit evalSystem; }}/paths.json", 78 78 # The number of attributes per chunk, see ./README.md for more info. 79 - chunkSize, 79 + chunkSize ? 5000, 80 80 checkMeta ? true, 81 81 82 82 # Don't try to eval packages marked as broken. ··· 131 131 in 132 132 runCommand "nixpkgs-eval-${evalSystem}" 133 133 { 134 - nativeBuildInputs = [ 135 - nix 136 - time 137 - procps 134 + # Don't depend on -dev outputs to reduce closure size for CI. 135 + nativeBuildInputs = map lib.getBin [ 136 + busybox 138 137 jq 138 + nix 139 139 ]; 140 140 env = { 141 141 inherit evalSystem chunkSize; ··· 160 160 # Record and print stats on free memory and swap in the background 161 161 ( 162 162 while true; do 163 - availMemory=$(free -b | grep Mem | awk '{print $7}') 164 - freeSwap=$(free -b | grep Swap | awk '{print $4}') 165 - echo "Available memory: $(( availMemory / 1024 / 1024 )) MiB, free swap: $(( freeSwap / 1024 / 1024 )) MiB" 163 + availMemory=$(free -m | grep Mem | awk '{print $7}') 164 + freeSwap=$(free -m | grep Swap | awk '{print $4}') 165 + echo "Available memory: $(( availMemory )) MiB, free swap: $(( freeSwap )) MiB" 166 166 167 167 if [[ ! -f "$out/${evalSystem}/min-avail-memory" ]] || (( availMemory < $(<$out/${evalSystem}/min-avail-memory) )); then 168 168 echo "$availMemory" > $out/${evalSystem}/min-avail-memory 169 169 fi 170 - if [[ ! -f $out/${evalSystem}/min-free-swap ]] || (( availMemory < $(<$out/${evalSystem}/min-free-swap) )); then 170 + if [[ ! -f $out/${evalSystem}/min-free-swap ]] || (( freeSwap < $(<$out/${evalSystem}/min-free-swap) )); then 171 171 echo "$freeSwap" > $out/${evalSystem}/min-free-swap 172 172 fi 173 173 sleep 4 ··· 206 206 }: 207 207 runCommand "combined-eval" 208 208 { 209 - nativeBuildInputs = [ 209 + # Don't depend on -dev outputs to reduce closure size for CI. 210 + nativeBuildInputs = map lib.getBin [ 210 211 jq 211 212 ]; 212 213 }