mirror of
https://github.com/BloopAI/sccache-action.git
synced 2026-08-23 12:18:32 +00:00
@@ -10,6 +10,8 @@ runs:
|
||||
using: "node16"
|
||||
main: "dist/setup/index.js"
|
||||
post: "dist/show_stats/index.js"
|
||||
# windows can't run `--show-stats` while server is running.
|
||||
post-if: runner.os != 'windows'
|
||||
branding:
|
||||
icon: "star"
|
||||
color: "orange"
|
||||
|
||||
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/show_stats/index.js
vendored
2
dist/show_stats/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -24,13 +24,13 @@ async function setup() {
|
||||
// TODO: we can support install latest version by default if version
|
||||
// is not input.
|
||||
const version = core.getInput('version');
|
||||
console.log('try to setup sccache version: ', version);
|
||||
core.debug(`try to setup sccache version: ${version}'`);
|
||||
|
||||
const filename = getFilename(version);
|
||||
const dirname = getDirname(version);
|
||||
|
||||
const downloadUrl = `https://github.com/mozilla/sccache/releases/download/${version}/${filename}`;
|
||||
console.log('sccache download from url: ', downloadUrl);
|
||||
core.debug(`sccache download from url: ${downloadUrl}`);
|
||||
|
||||
// Download and extract.
|
||||
const sccachePackage = await downloadTool(downloadUrl);
|
||||
@@ -41,7 +41,7 @@ async function setup() {
|
||||
} else {
|
||||
sccachePath = await extractTar(sccachePackage);
|
||||
}
|
||||
console.log('sccache extracted to: ', sccachePath);
|
||||
core.debug(`sccache extracted to: ${sccachePath}`);
|
||||
|
||||
// Cache sccache.
|
||||
const sccacheHome = await cacheDir(
|
||||
@@ -49,7 +49,7 @@ async function setup() {
|
||||
'sccache',
|
||||
version
|
||||
);
|
||||
console.log('sccache cached to: ', sccacheHome);
|
||||
core.debug(`sccache cached to: ${sccacheHome}`);
|
||||
|
||||
// Add cached sccache into path.
|
||||
core.addPath(`${sccacheHome}`);
|
||||
|
||||
Reference in New Issue
Block a user