Compare commits
6 Commits
main
...
feature/bu
Author | SHA1 | Date | |
---|---|---|---|
474184baa7 | |||
fd826be6da | |||
ea16a83c2e | |||
050b4c9b2f | |||
ea5616416a | |||
2a0fe0b106 |
14
.github/workflows/cache-merge.yml
vendored
14
.github/workflows/cache-merge.yml
vendored
@ -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
|
||||
@ -30,6 +29,8 @@ jobs:
|
||||
- name: Install nix
|
||||
uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- run: nix profile install nixpkgs#sqlite
|
||||
|
||||
- uses: nix-community/cache-nix-action@v6
|
||||
name: create and purge common cache
|
||||
with:
|
||||
@ -46,6 +47,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 +65,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 +73,7 @@ jobs:
|
||||
needs: merge-similar-caches
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- [ubuntu-latest]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout this repo
|
||||
@ -80,7 +82,9 @@ jobs:
|
||||
- name: Install nix
|
||||
uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- run: nix profile install nixpkgs#sqlite
|
||||
|
||||
- name: Restore Nix store
|
||||
- uses: nix-community/cache-nix-action@v6
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
with:
|
||||
primary-key: similar-cache-${{ matrix.os }}-common-${{ hashFiles('flake.lock') }}
|
||||
|
12
.github/workflows/flake-health-checks.yml
vendored
12
.github/workflows/flake-health-checks.yml
vendored
@ -16,6 +16,10 @@ jobs:
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: nix profile install nixpkgs#sqlite
|
||||
|
||||
- name: Restore Nix store
|
||||
id: restore
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
@ -33,8 +37,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 +50,10 @@ jobs:
|
||||
steps:
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: nix profile install nixpkgs#sqlite
|
||||
|
||||
- name: Restore Nix store
|
||||
id: restore
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
@ -65,8 +71,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 .
|
||||
|
||||
|
2
.github/workflows/flake-update.yml
vendored
2
.github/workflows/flake-update.yml
vendored
@ -15,6 +15,8 @@ jobs:
|
||||
- name: Install nix
|
||||
uses: https://github.com/DeterminateSystems/nix-installer-action@main
|
||||
|
||||
- run: nix profile install nixpkgs#sqlite
|
||||
|
||||
- name: Restore Nix store
|
||||
id: restore
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user