Compare commits

...

8 Commits

Author SHA1 Message Date
7dec8a2034 add token to cache-merge
All checks were successful
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 19s
Check Nix formatting / Perform Nix format checks (pull_request) Successful in 2m38s
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Successful in 8m30s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Successful in 21m14s
2025-03-10 09:50:40 -04:00
2aeb416468 add token to cache-merge 2025-03-10 09:50:40 -04:00
4b263206dd Merge pull request 'feature/build-cache' (#35) from feature/build-cache into main
Some checks failed
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (push) Successful in 8m41s
Check Nix flake / Build nix outputs (ubuntu-latest) (push) Successful in 1h40m13s
Check flake.lock / Check health of `flake.lock` (push) Successful in 15s
Check Nix formatting / Perform Nix format checks (push) Successful in 2m35s
Nix CI / Merge similar caches (ubuntu-latest) (push) Failing after 41s
Nix CI / Check a `common` cache is restored correctly (ubuntu-latest) (push) Has been skipped
Update flakes / update_lockfile (push) Failing after 9m54s
2025-03-10 01:24:01 -04:00
3cfdf94428 reorder oops 2025-03-10 01:24:01 -04:00
3bf4740ad3 remove cache max limit 2025-03-10 01:24:01 -04:00
b0d38221a3 Merge pull request 'fix os matrix?' (#34) from feature/build-cache into main
Some checks failed
Check flake.lock / Check health of `flake.lock` (push) Has been cancelled
Check Nix formatting / Perform Nix format checks (push) Has been cancelled
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (push) Successful in 10m11s
Nix CI / Merge similar caches (ubuntu-latest) (push) Failing after 37s
Check Nix flake / Build nix outputs (ubuntu-latest) (push) Successful in 26m32s
Nix CI / Check a `common` cache is restored correctly (ubuntu-latest) (push) Has been skipped
2025-03-10 00:49:30 -04:00
5d0f7f91d3 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 flake.lock / Check health of `flake.lock` (pull_request) Successful in 13s
Check Nix formatting / Perform Nix format checks (pull_request) Has been cancelled
2025-03-10 00:49:19 -04:00
297479380a Merge pull request 'feature/build-cache' (#33) from feature/build-cache into main
Some checks failed
Check Nix formatting / Perform Nix format checks (push) Has been cancelled
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (push) Has been cancelled
Check Nix flake / Build nix outputs (ubuntu-latest) (push) Has been cancelled
Nix CI / Merge similar caches ([ubuntu-latest]) (push) Waiting to run
Nix CI / Check a `common` cache is restored correctly ([ubuntu-latest]) (push) Blocked by required conditions
Check flake.lock / Check health of `flake.lock` (push) Successful in 14s
2025-03-10 00:46:02 -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