Skip to content

Commit

Permalink
Merge pull request #18 from nix-community/big-update
Browse files Browse the repository at this point in the history
Big update
  • Loading branch information
deemp committed Dec 11, 2023
2 parents 1bb58e9 + 263360b commit 9e6bb4d
Show file tree
Hide file tree
Showing 51 changed files with 100,048 additions and 5,351 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
40 changes: 18 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,25 @@ jobs:
- name: Rebase
run: git pull --rebase

- uses: nixbuild/nix-quick-install-action@v25
- uses: nixbuild/nix-quick-install-action@v26
with:
nix_conf: |
substituters = https://cache.nixos.org/ https://nix-community.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
keep-outputs = true
- name: Restore and cache Nix store - ${{ matrix.id }}
uses: ./.
with:
# save a new cache every time ci file changes
key: similar-cache-${{ matrix.os }}-id-${{ matrix.id }}-${{ hashFiles('.github/workflows/ci.yaml') }}
restore-keys: |
similar-cache-${{ matrix.os }}-common-
restore-key-hit: true

primary-key: similar-cache-${{ matrix.os }}-individual-${{ matrix.id }}-${{ hashFiles('.github/workflows/ci.yaml') }}
restore-prefixes-first-match: similar-cache-${{ matrix.os }}-common-

# remove own old versions
purge: true
purge-created: 0
purge-prefixes: similar-cache-${{ matrix.os }}-individual-${{ matrix.id }}-

# Merge similar individual `id` caches
# Purge individual caches and old `common` caches
# Save new `common` caches
Expand Down Expand Up @@ -171,15 +175,14 @@ jobs:
- name: Save Nix store
uses: ./.
with:
key: similar-cache-${{ matrix.os }}-common-${{ hashFiles('.github/workflows/ci.yaml') }}
extra-restore-keys: |
similar-cache-${{ matrix.os }}-id-
primary-key: similar-cache-${{ matrix.os }}-common-${{ hashFiles('.github/workflows/ci.yaml') }}
restore-prefixes-all-matches: similar-cache-${{ matrix.os }}-individual-

purge: true
purge-keys: |
similar-cache-${{ matrix.os }}-id-
purge-prefixes: |
similar-cache-${{ matrix.os }}-individual-
similar-cache-${{ matrix.os }}-common-
purge-created-max-age: 0
purge-created: 0

compare-run-times:
name: Job with caching
Expand Down Expand Up @@ -212,27 +215,20 @@ jobs:
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
keep-outputs = true
# -------- THIS ACTION --------
- name: Restore and cache Nix store
if: ${{ matrix.do-cache }}
uses: ./.
with:
# save a new cache every time ci file changes
key: cache-${{ matrix.os }}-${{ hashFiles('.github/workflows/ci.yaml') }}
restore-keys: |
cache-${{ matrix.os }}-
restore-prefixes-first-match: cache-${{ matrix.os }}-

gc-linux: true
gc-max-store-size-linux: 8000000000
gc-macos: true
gc-max-store-size-macos: 8000000000

purge: true
purge-keys: cache-${{ matrix.os }}-
purge-created: true
purge-created-max-age: 172800

# -------- THIS ACTION --------
purge-prefixes: cache-${{ matrix.os }}-
purge-created: 172800

# Uncomment to debug this job
# - name: Setup tmate session
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,8 @@ typings/
# Text editor files
.vscode/

.direnv
.direnv

__pycache__

table.md
2 changes: 1 addition & 1 deletion .licenses/npm/@actions/cache.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .licenses/npm/@actions/http-client.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

219 changes: 87 additions & 132 deletions README.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@
### 3.3.1

- Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

### 3.3.2

- Fixes bug with Azure SDK causing blob downloads to get stuck.
1 change: 0 additions & 1 deletion __tests__/__fixtures__/helloWorld.txt

This file was deleted.

233 changes: 0 additions & 233 deletions __tests__/actionUtils.test.ts

This file was deleted.

17 changes: 0 additions & 17 deletions __tests__/create-cache-files.sh

This file was deleted.

Loading

0 comments on commit 9e6bb4d

Please sign in to comment.