Compare commits

...

5 Commits

Author SHA1 Message Date
fd826be6da
add token to cache-merge
Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 14s
Check Nix formatting / Perform Nix format checks (pull_request) Has been cancelled
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Has been cancelled
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Has been cancelled
2025-03-10 09:49:19 -04:00
ea16a83c2e
add token to cache-merge 2025-03-10 09:48:44 -04:00
050b4c9b2f
reorder oops
All checks were successful
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 27s
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 2m51s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Successful in 2h16m35s
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Successful in 7m59s
2025-03-10 01:23:20 -04:00
ea5616416a
remove cache max limit 2025-03-10 01:06:56 -04:00
2a0fe0b106
fix os matrix?
Some checks failed
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Has been cancelled
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Has been cancelled
Check Nix formatting / Perform Nix format checks (pull_request) Has been cancelled
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 10s
2025-03-10 00:48:57 -04:00
3 changed files with 15 additions and 9 deletions

View File

@ -20,8 +20,7 @@ jobs:
name: Merge similar caches
strategy:
matrix:
os:
- [ubuntu-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout this repo
@ -46,6 +45,7 @@ jobs:
purge-created: 0
# except the version with the `primary-key`, if it exists
purge-primary-key: never
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
- uses: nix-community/cache-nix-action@v6
name: purge some individual caches
@ -63,6 +63,7 @@ jobs:
purge-created: 259200
# except the version with the `primary-key`, if it exists
purge-primary-key: never
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
# Check that the `common` cache is restored correctly
merge-similar-caches-check:
@ -70,8 +71,7 @@ jobs:
needs: merge-similar-caches
strategy:
matrix:
os:
- [ubuntu-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout this repo

View File

@ -16,6 +16,8 @@ jobs:
steps:
- uses: DeterminateSystems/nix-installer-action@main
- uses: actions/checkout@v4
- name: Restore Nix store
id: restore
uses: nix-community/cache-nix-action@v6
@ -33,8 +35,6 @@ jobs:
token: ${{ secrets.ATTIC_TOKEN }}
skip-push: "true"
- uses: actions/checkout@v4
- run: nix flake check --accept-flake-config
- run: nix ./utils/attic-push.bash
@ -48,6 +48,8 @@ jobs:
steps:
- uses: DeterminateSystems/nix-installer-action@main
- uses: actions/checkout@v4
- name: Restore Nix store
id: restore
uses: nix-community/cache-nix-action@v6
@ -65,8 +67,6 @@ jobs:
token: ${{ secrets.ATTIC_TOKEN }}
skip-push: "true"
- uses: actions/checkout@v4
- name: Build all outputs
run: nix run git+https://nayeonie.com/ahuston-0/flake-update-diff -- --build .

View File

@ -6,10 +6,16 @@
set -e
# retrieve all paths under 2G
# nix_paths=$(nix path-info --json --all --closure-size \
# | jq 'map_values(.closureSize | select(. < 2e9)) | to_entries | sort_by(.value)' \
# | jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
# retrieve all paths
nix_paths=$(nix path-info --json --all --closure-size \
| jq 'map_values(.closureSize | select(. < 2e9)) | to_entries | sort_by(.value)' \
| jq 'map_values(.closureSize | select(true)) | to_entries | sort_by(.value)' \
| jq 'map(.key) | join("\n")' | sed -E -e 's/\\n/\n/g;s/^"//g;s/"$//g')
readarray -t nix_path_array < <(echo "$nix_paths")
batchsize=1000