Browse Source

upload all devshell inputs to the cache

This will also include attic, so we don't need to explicitly do this
in `./bin/nix-build-and-cache` anymore, which is good because that
script gets called a good number of times and doing that repeatedly was
a bit of a waste.
merge-requests/582/head
Charles Hall 2 years ago
parent
commit
d411e9037c
No known key found for this signature in database
GPG Key ID: 7B8E0645816E07CF
  1. 3
      .gitlab-ci.yml
  2. 15
      bin/nix-build-and-cache

3
.gitlab-ci.yml

@ -36,6 +36,9 @@ ci:
stage: ci
image: nixos/nix:2.20.4
script:
# Cache the inputs required for the devShell
- ./bin/nix-build-and-cache .#devShells.x86_64-linux.default.inputDerivation
- direnv exec . engage
cache:
key: nix

15
bin/nix-build-and-cache

@ -15,17 +15,12 @@ nix run --inputs-from . attic -- login \
https://nix.computer.surgery/conduit \
"$ATTIC_TOKEN"
push_args=(
# Attic and its build dependencies
"$(nix path-info --inputs-from . attic)"
"$(nix path-info --inputs-from . attic --derivation)"
# The target installable and its build dependencies
"$(nix path-info "$INSTALLABLE" --derivation)"
# Push the target installable and its build dependencies
nix run --inputs-from . attic -- \
push \
conduit \
"$(nix path-info "$INSTALLABLE" --derivation)" \
"$(nix path-info "$INSTALLABLE")"
)
nix run --inputs-from . attic -- push conduit "${push_args[@]}"
else
echo "\$ATTIC_TOKEN is unset, skipping uploading to the binary cache"
fi

Loading…
Cancel
Save