-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cache rust build
with turbo
#261
cache rust build
with turbo
#261
Conversation
These are in parallel so I've added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please rebase this on main and I'll review it again?
path: .turbo | ||
key: ${{ runner.os }}-turbo-${{ inputs.artifact-name }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-turbo-${{ inputs.artifact-name }}- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I don't really understand what's happening here, so apologies for the basic question, but should we have ${{ inputs.artifact-name }}-${{ github.sha }}
or the like here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restores .turbo
directory that contains all the hashed
inputs
and outputs
.
The actions/cache
will lookup key
first, then if it's not available it will look for entry starting with the patterns provided in restore-keys
.
So this let's us restore cache from previous commit.
turbo.json
Outdated
"$schema": "https://turbo.build/schema.json", | ||
"tasks": { | ||
"//#build": { | ||
"inputs": ["crates/**", "Cargo.*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should add relay-crates/**
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
Closes #19