diff --git a/dist/restore/index.js b/dist/restore/index.js index 42942b08..387bc01b 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -55111,7 +55111,13 @@ async function restore() { const paths = [ '.ccache' ]; - await cache.restoreCache(paths, key, restoreKeys); + const restoredWith = await cache.restoreCache(paths, key, restoreKeys); + if (restoredWith) { + core.info(`Restored from cache key "${restoredWith}".`); + } + else { + core.info("No cache found."); + } } async function configure() { const ghWorkSpace = external_process_namespaceObject.env.GITHUB_WORKSPACE; diff --git a/dist/save/index.js b/dist/save/index.js index f83d796d..ccc84257 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -55072,10 +55072,15 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _actions_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_actions_core__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _actions_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7799); /* harmony import */ var _actions_cache__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_actions_cache__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1514); +/* harmony import */ var _actions_exec__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_actions_exec__WEBPACK_IMPORTED_MODULE_2__); + async function run() { try { + _actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Ccache stats:"); + await _actions_exec__WEBPACK_IMPORTED_MODULE_2__.exec("ccache -s"); let restoreKey = `ccache-`; let inputKey = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("key"); if (inputKey) { @@ -55085,6 +55090,7 @@ async function run() { const paths = [ '.ccache' ]; + _actions_core__WEBPACK_IMPORTED_MODULE_0__.info(`Save cache using key "${key}".`); await _actions_cache__WEBPACK_IMPORTED_MODULE_1__.saveCache(paths, key); } catch (error) { diff --git a/src/restore.ts b/src/restore.ts index 5b2c0d68..e885ffc2 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -28,11 +28,17 @@ async function restore() { ] const key = restoreKey + "-" + new Date().toISOString(); + const paths = [ '.ccache' ] - await cache.restoreCache(paths, key, restoreKeys) + const restoredWith = await cache.restoreCache(paths, key, restoreKeys) + if (restoredWith) { + core.info(`Restored from cache key "${restoredWith}".`); + } else { + core.info("No cache found."); + } } async function configure() { diff --git a/src/save.ts b/src/save.ts index eb2df04c..9eb54c40 100644 --- a/src/save.ts +++ b/src/save.ts @@ -1,8 +1,12 @@ import * as core from "@actions/core"; import * as cache from "@actions/cache"; +import * as exec from "@actions/exec"; async function run() : Promise { try{ + core.info("Ccache stats:") + await exec.exec("ccache -s"); + let restoreKey = `ccache-`; let inputKey = core.getInput("key"); @@ -15,6 +19,7 @@ async function run() : Promise { '.ccache' ] + core.info(`Save cache using key "${key}".`) await cache.saveCache(paths, key); } catch (error) { core.setFailed(error.message);