File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ sensible defaults.
60
60
# default: "false"
61
61
cache-all-crates : " "
62
62
63
+ # Similar to cache-all-crates.
64
+ # If `true` the workspace crates will be cached.
65
+ # Useful if the workspace contains libraries that are only updated sporadically.
66
+ # default: "false"
67
+ cache-workspace-crates : " "
68
+
63
69
# Determines whether the cache should be saved.
64
70
# If `false`, the cache is only restored.
65
71
# Useful for jobs where the matrix is additive e.g. additional Cargo features,
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ inputs:
32
32
description : " Determines which crates are cached. If `true` all crates will be cached, otherwise only dependent crates will be cached."
33
33
required : false
34
34
default : " false"
35
+ cache-workspace-crates :
36
+ description : " Similar to cache-all-crates. If `true` the workspace crates will be cached."
37
+ required : false
38
+ default : " false"
35
39
save-if :
36
40
description : " Determiners whether the cache should be saved. If `false`, the cache is only restored."
37
41
required : false
Original file line number Diff line number Diff line change @@ -87340,9 +87340,14 @@ async function run() {
87340
87340
if (process.env["RUNNER_OS"] == "macOS") {
87341
87341
await macOsWorkaround();
87342
87342
}
87343
+ const workspaceCrates = core.getInput("cache-workspace-crates").toLowerCase() || "false";
87343
87344
const allPackages = [];
87344
87345
for (const workspace of config.workspaces) {
87345
87346
const packages = await workspace.getPackagesOutsideWorkspaceRoot();
87347
+ if (workspaceCrates === "true") {
87348
+ const wsMembers = await workspace.getWorkspaceMembers();
87349
+ packages.push(...wsMembers);
87350
+ }
87346
87351
allPackages.push(...packages);
87347
87352
try {
87348
87353
core.info(`... Cleaning ${workspace.target} ...`);
Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ async function run() {
36
36
await macOsWorkaround ( ) ;
37
37
}
38
38
39
+ const workspaceCrates = core . getInput ( "cache-workspace-crates" ) . toLowerCase ( ) || "false" ;
39
40
const allPackages = [ ] ;
40
41
for ( const workspace of config . workspaces ) {
41
42
const packages = await workspace . getPackagesOutsideWorkspaceRoot ( ) ;
43
+ if ( workspaceCrates === "true" ) {
44
+ const wsMembers = await workspace . getWorkspaceMembers ( ) ;
45
+ packages . push ( ...wsMembers ) ;
46
+ }
42
47
allPackages . push ( ...packages ) ;
43
48
try {
44
49
core . info ( `... Cleaning ${ workspace . target } ...` ) ;
You can’t perform that action at this time.
0 commit comments