mirror of
https://github.com/mozilla-actions/sccache-action
synced 2026-09-14 20:13:56 +00:00
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
"description": "Github Action for Sccache",
|
"description": "Github Action for Sccache",
|
||||||
"main": "dist/setup/index.js",
|
"main": "dist/setup/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-dist": "ncc build lib/setup.js -m -o dist/setup/ && ncc build lib/setup.js -m -o dist/show_stats",
|
"build-dist": "ncc build lib/setup.js -m -o dist/setup/ && ncc build lib/show_stats.js -m -o dist/show_stats",
|
||||||
"build": "prettier --write **/*.ts && tsc && npm run build-dist",
|
"build": "prettier --write **/*.ts && tsc && npm run build-dist",
|
||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/*.ts",
|
||||||
|
|||||||
+4
-4
@@ -24,13 +24,13 @@ async function setup() {
|
|||||||
// TODO: we can support install latest version by default if version
|
// TODO: we can support install latest version by default if version
|
||||||
// is not input.
|
// is not input.
|
||||||
const version = core.getInput('version');
|
const version = core.getInput('version');
|
||||||
core.debug(`try to setup sccache version: ${version}'`);
|
core.info(`try to setup sccache version: ${version}'`);
|
||||||
|
|
||||||
const filename = getFilename(version);
|
const filename = getFilename(version);
|
||||||
const dirname = getDirname(version);
|
const dirname = getDirname(version);
|
||||||
|
|
||||||
const downloadUrl = `https://github.com/mozilla/sccache/releases/download/${version}/${filename}`;
|
const downloadUrl = `https://github.com/mozilla/sccache/releases/download/${version}/${filename}`;
|
||||||
core.debug(`sccache download from url: ${downloadUrl}`);
|
core.info(`sccache download from url: ${downloadUrl}`);
|
||||||
|
|
||||||
// Download and extract.
|
// Download and extract.
|
||||||
const sccachePackage = await downloadTool(downloadUrl);
|
const sccachePackage = await downloadTool(downloadUrl);
|
||||||
@@ -41,7 +41,7 @@ async function setup() {
|
|||||||
} else {
|
} else {
|
||||||
sccachePath = await extractTar(sccachePackage);
|
sccachePath = await extractTar(sccachePackage);
|
||||||
}
|
}
|
||||||
core.debug(`sccache extracted to: ${sccachePath}`);
|
core.info(`sccache extracted to: ${sccachePath}`);
|
||||||
|
|
||||||
// Cache sccache.
|
// Cache sccache.
|
||||||
const sccacheHome = await cacheDir(
|
const sccacheHome = await cacheDir(
|
||||||
@@ -49,7 +49,7 @@ async function setup() {
|
|||||||
'sccache',
|
'sccache',
|
||||||
version
|
version
|
||||||
);
|
);
|
||||||
core.debug(`sccache cached to: ${sccacheHome}`);
|
core.info(`sccache cached to: ${sccacheHome}`);
|
||||||
|
|
||||||
// Add cached sccache into path.
|
// Add cached sccache into path.
|
||||||
core.addPath(`${sccacheHome}`);
|
core.addPath(`${sccacheHome}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user