Compare commits
3 commits
f8dcefa913
...
b0bcc21fc0
Author | SHA1 | Date | |
---|---|---|---|
b0bcc21fc0 | |||
f6c6f24083 | |||
fba0d4120d |
3 changed files with 14 additions and 5 deletions
14
.github/workflows/build-machines-and-homes.yml
vendored
14
.github/workflows/build-machines-and-homes.yml
vendored
|
@ -63,13 +63,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
nix profile install github:zhaofengli/attic
|
nix profile install github:zhaofengli/attic
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
- name: build and cache
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
- name: cache
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
package=".#nixosConfigurations."${{ matrix.machine }}".config.system.build.toplevel"
|
||||||
derivation="$(nix path-info --derivation "$package")"
|
derivation="$(nix path-info --derivation "$package")"
|
||||||
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
||||||
attic push main --stdin <<< "$cache"
|
xargs attic push main <<< "$cache"
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -119,10 +123,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
nix profile install github:zhaofengli/attic
|
nix profile install github:zhaofengli/attic
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
- name: build and cache
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
nix build -L "$package"
|
nix build -L "$package"
|
||||||
|
- name: cache
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
package=".#homeConfigurations."${{ matrix.home }}".activationPackage"
|
||||||
derivation="$(nix path-info --derivation "$package")"
|
derivation="$(nix path-info --derivation "$package")"
|
||||||
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
||||||
attic push main --stdin <<< "$cache"
|
attic push main --stdin <<< "$cache"
|
||||||
|
|
3
.github/workflows/build-packages.yml
vendored
3
.github/workflows/build-packages.yml
vendored
|
@ -42,10 +42,11 @@ jobs:
|
||||||
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
attic login cy7 https://cache.cy7.sh "$ATTIC_TOKEN"
|
||||||
- run: nix build -L ${{ matrix.package }}
|
- run: nix build -L ${{ matrix.package }}
|
||||||
- name: cache result
|
- name: cache result
|
||||||
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
derivation="$(nix path-info --derivation "${{ matrix.package }}")"
|
derivation="$(nix path-info --derivation "${{ matrix.package }}")"
|
||||||
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
cache="$(nix-store --query --requisites --include-outputs "$derivation")"
|
||||||
attic push main --stdin <<< "$cache"
|
xargs attic push main <<< "$cache"
|
||||||
- name: prepare tarball to upload
|
- name: prepare tarball to upload
|
||||||
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
run: nix run github:nixos/nixpkgs#gnutar hcvf result.tar result
|
||||||
- name: upload result
|
- name: upload result
|
||||||
|
|
|
@ -7,7 +7,7 @@ index 02e4857..71eeee8 100644
|
||||||
// TODO: Make num_prefetch configurable
|
// TODO: Make num_prefetch configurable
|
||||||
// The ideal size depends on the average chunk size
|
// The ideal size depends on the average chunk size
|
||||||
- let merged = merge_chunks(chunks, streamer, storage, 2).map_err(|e| {
|
- let merged = merge_chunks(chunks, streamer, storage, 2).map_err(|e| {
|
||||||
+ let merged = merge_chunks(chunks, streamer, storage, 32).map_err(|e| {
|
+ let merged = merge_chunks(chunks, streamer, storage, 16).map_err(|e| {
|
||||||
tracing::error!(%e, "Stream error");
|
tracing::error!(%e, "Stream error");
|
||||||
e
|
e
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue