Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PaymentServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Administrator
PaymentServer
Commits
37f4c9ab
Commit
37f4c9ab
authored
5 years ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Fix the problem and cache based on ristretto too
parent
4216f194
Branches
Branches containing commit
No related tags found
1 merge request
!20
Construct a better Nix store cache key for CircleCI
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.circleci/config.yml
+20
-4
20 additions, 4 deletions
.circleci/config.yml
with
20 additions
and
4 deletions
.circleci/config.yml
+
20
−
4
View file @
37f4c9ab
...
...
@@ -29,6 +29,10 @@ jobs:
# time of this comment. We can bump it to a newer version when that
# makes sense. Meanwhile, the platform won't shift around beneath us
# unexpectedly.
#
# Note CircleCI cannot interpolate environment variables set here into
# cache keys. Therefore, this value is *duplicated* below. When
# changing it, change the value below as well.
NIXPKGS_REV
:
"
3c83ad6ac13b67101cc3e2e07781963a010c1624"
steps
:
...
...
@@ -54,11 +58,23 @@ jobs:
# Read about caching dependencies: https://circleci.com/docs/2.0/caching/
name
:
"
Restore
Nix
Store
Paths"
keys
:
#
This doesn't work right. "<no value>" is interpolated in,
#
instead of the value for NIXPKGS_REV set abov
e.
#
Construct cache keys that allow sharing as long as nixpkgs and
#
the Ristretto library are the sam
e.
#
# https://github.com/PrivateStorageio/PaymentServer/issues/15
-
paymentserver-nix-store-v1-{{ .Environment.NIXPKGS_REV }}
# If the Ristretto library changes, we have to rebuild it so we
# may as well throw away the part of the cache with the old build
# and make a new one with the new build so we don't have to
# rebuild it *again* next time.
#
# If nixpkgs changes then potentially a lot of cached packages for
# the base system will be invalidated so we may as well drop them
# and make a new cache with the new packages.
#
# Note: The literal hash here must match NIXPKGS_REV set above.
# CircleCI doesn't let us interpolate that value so we *duplicate*
# it instead.
-
paymentserver-nix-store-v1-3c83ad6ac13b67101cc3e2e07781963a010c1624-{{ checksum "ristretto.nix" }}
-
paymentserver-nix-store-v1-3c83ad6ac13b67101cc3e2e07781963a010c1624-
-
paymentserver-nix-store-v1-
# Get *our* source code.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment