Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Sep 8, 2023
1 parent ff13b01 commit 9ec9ca3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59616,13 +59616,16 @@ async function restore(ccacheVariant) {
}
}
}
async function configure(ccacheVariant) {
async function configure(ccacheVariant, platform) {
const ghWorkSpace = external_process_namespaceObject.env.GITHUB_WORKSPACE || "unreachable, make ncc happy";
const maxSize = core.getInput('max-size');
if (ccacheVariant === "ccache") {
await execBash(`ccache --set-config=cache_dir='${external_path_default().join(ghWorkSpace, '.ccache')}'`);
await execBash(`ccache --set-config=max_size='${maxSize}'`);
await execBash(`ccache --set-config=compression=true`);
if (platform === "darwin") {
await execBash(`ccache --set-config=compiler_check=content`);
}
core.info("Cccache config:");
await execBash("ccache -p");
}
Expand Down Expand Up @@ -59736,8 +59739,8 @@ async function runInner() {
core.startGroup("Restore cache");
await restore(ccacheVariant);
core.endGroup();
core.startGroup(`Configure ${ccacheVariant}`);
await configure(ccacheVariant);
core.startGroup(`Configure ${ccacheVariant}, ${external_process_namespaceObject.platform}`);
await configure(ccacheVariant, external_process_namespaceObject.platform);
await execBash(`${ccacheVariant} -z`);
core.endGroup();
}
Expand Down

0 comments on commit 9ec9ca3

Please sign in to comment.