From 4021cfa2adf4873e1d0733d0e8b9ba678a9082de Mon Sep 17 00:00:00 2001 From: luca <681992+lukka@users.noreply.github.com> Date: Sun, 2 Apr 2023 00:00:28 -0700 Subject: [PATCH] fix log output --- README.md | 36 +++++++++-------- dist/index.js | 22 ++++++----- package-lock.json | 94 ++++++++++++++++++++++----------------------- package.json | 10 ++--- src/vcpkg-action.ts | 18 +++++---- src/vcpkg-utils.ts | 1 - 6 files changed, 95 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 5c9f8374..168bb35c 100644 --- a/README.md +++ b/README.md @@ -58,9 +58,10 @@ jobs: # Or pin to a specific CMake version: # lukka/get-cmake@v3.21.2 - # Run vcpkg leveraging its own binary caching integration with GitHub Action - # cache. Since vcpkg.json is being used later on to install the packages - # when `run-cmake` runs, no packages are installed at this time. + # Setup vcpkg: ensures vcpkg is downloaded and built. + # Since vcpkg.json is being used later on to install the packages + # when `run-cmake` runs, no packages are installed at this time + # (and vcpkg does not run). - name: Setup vcpkg (it does not install any package yet) uses: lukka/run-vcpkg@v11 #with: @@ -69,8 +70,8 @@ jobs: # vcpkgDirectory: '${{ github.workspace }}/vcpkg' # If not using a submodule for vcpkg sources, this specifies which commit - # id must be checkout from a Git repo. It must not be set if using a - # submodule for vcpkg. + # id must be checkout from a Git repo. + # Note: it must not be set if using a Git submodule for vcpkg. # vcpkgGitCommitId: '${{ matrix.vcpkgCommitId }}' # This is the glob expression used to locate the vcpkg.json. @@ -81,7 +82,7 @@ jobs: # `**/path/from/root/of/repo/to/vcpkg.json` to match the desired `vcpkg.json`. # vcpkgJsonGlob: '**/vcpkg.json' - # This is only needed if running `vcpkg install` is needed at this step. + # This is only needed if the command `vcpkg install` must run at this step. # Instead it is highly suggested to let `run-cmake` to run vcpkg later on # using the vcpkg.cmake toolchain. The default is `false`. # runVcpkgInstall: true @@ -123,10 +124,11 @@ Flowchart with related input in [action.yml](https://github.com/lukka/run-vcpkg/ ``` ┌──────────────────────────┐ +| Skipped by default. | │ Compute cache key from: │ Inputs: │ - vcpkg Git commit │ - `vcpkgGitCommitId` -│ - platform and OS │ -└─────────────┬────────────┘ +│ - platform and OS │ - `doNotCache`: set to false +└─────────────┬────────────┘ to run this block. │ ▼ ┌─────────────────────────┐ Inputs: @@ -135,9 +137,10 @@ Flowchart with related input in [action.yml](https://github.com/lukka/run-vcpkg/ │ ▼ ┌─────────────────────────┐ Inputs: + | Skipped by default. | │ Restore vcpkg │ - `vcpkgDirectory` - │ from the GH cache │ - └────────────┬────────────┘ + │ from the GH cache. │ - `doNotCache`: set to false + └────────────┬────────────┘ to run this block. │ ▼ ┌─────────────────────────┐ @@ -150,7 +153,7 @@ Flowchart with related input in [action.yml](https://github.com/lukka/run-vcpkg/ ┌─────────────────────────┐ │ Rebuild vcpkg executable│ Inputs: │ if not in sync with │ - `vcpkgGitCommitId` - │ sources │ - `vcpkgGitURL` + │ sources. │ - `vcpkgGitURL` └────────────┬────────────┘ │ ▼ @@ -161,7 +164,7 @@ Flowchart with related input in [action.yml](https://github.com/lukka/run-vcpkg/ ┌─────────────────────────┐ │ │ Launch `vcpkg install` │ │ Inputs: │ where vcpkg.json has │ │ - `runVcpkgFormatString` - │ been located │ │ Environment variables: + │ been located. │ │ Environment variables: └────────────┬────────────┘ │ - `VCPKG_DEFAULT_TRIPLET` is used. If not yet │ │ set, it is set to the current platform. │ │ - `VCPKG_INSTALLED_DIR` is used as value for @@ -171,14 +174,15 @@ Flowchart with related input in [action.yml](https://github.com/lukka/run-vcpkg/ ┌─────────────────────────┐ │ set, it is set to leverage the GitHub Action │ Set `VCPKG_ROOT` and │ │ cache storage for Binary Caching artifacts. │ `VCPKG_DEFAULT_TRIPLET` │ │ - │ workflow-wide env vars │ │ + │ workflow-wide env vars. │ │ └────────────┬────────────┘ │ ├───────────── ┘ ▼ ┌─────────────────────────┐ - │ If no cache-hit, │ Inputs: - │ store vcpkg onto │ - `doNotCache`: disable the caching of the vcpkg - │ GH cache │ executable and its data files. + | Skipped by default. | + │ If no cache-hit, │ Inputs: + │ store vcpkg onto │ - `doNotCache`: set to false to + │ GH cache │ run this block. └────────────┬────────────┘ | ▼ diff --git a/dist/index.js b/dist/index.js index 6a689dcd..67e29bbc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -122,8 +122,9 @@ class VcpkgAction { // Ensure vcpkg root is set. if (!vcpkgRoot) { vcpkgRoot = yield runvcpkglib.getDefaultVcpkgDirectory(this.baseUtilLib.baseLib); - baseLib.info(`The vcpkg's root directory is not provided, using the predefined: '${this.vcpkgRootDir}'`); + baseLib.info(`The vcpkg's root directory is not provided, using the default value: '${this.vcpkgRootDir}'`); } + baseLib.info(`The vpckg root directory: '${vcpkgRoot}'`); // Create the vcpkg_root and cache directory if needed. const binCachePath = (_a = this.binaryCachePath) !== null && _a !== void 0 ? _a : yield runvcpkglib.getDefaultVcpkgCacheDirectory(this.baseUtilLib.baseLib); baseLib.debug(`vcpkgRootDir=${this.vcpkgRootDir}, binCachePath=${binCachePath}`); @@ -136,9 +137,10 @@ class VcpkgAction { if (!this.vcpkgRootDir) { throw new Error(`vcpkgRootDir is not defined!`); } - let vcpkgJsonFilePath = null; - const vcpkgJsonPath = yield vcpkgutil.Utils.getVcpkgJsonPath(this.baseUtilLib, this.vcpkgJsonGlob, this.vcpkgJsonIgnores); - vcpkgJsonFilePath = yield this.getCurrentDirectoryForRunningVcpkg(vcpkgJsonPath); + const vcpkgJsonFilePath = yield this.baseUtilLib.wrapOp(`Searching for vcpkg.json with glob expression '${this.vcpkgJsonGlob}'`, () => __awaiter(this, void 0, void 0, function* () { + const vcpkgJsonPath = yield vcpkgutil.Utils.getVcpkgJsonPath(this.baseUtilLib, this.vcpkgJsonGlob, this.vcpkgJsonIgnores); + return yield this.getCurrentDirectoryForRunningVcpkg(vcpkgJsonPath); + })); let isCacheHit = null; let cacheKey = null; if (this.doNotCache) { @@ -146,10 +148,10 @@ class VcpkgAction { } else { cacheKey = - yield this.baseUtilLib.wrapOp('Compute vcpkg cache key', () => __awaiter(this, void 0, void 0, function* () { + yield this.baseUtilLib.wrapOp('Computing vcpkg cache key', () => __awaiter(this, void 0, void 0, function* () { const keys = yield vcpkgutil.Utils.computeCacheKeys(this.baseUtilLib, this.vcpkgRootDir, // HACK: if it were not set it would have thrown before. this.userProvidedCommitId); - if (keys && vcpkgJsonPath) { + if (keys) { baseLib.info(`Computed key: ${JSON.stringify(keys)}`); } else { @@ -44134,9 +44136,11 @@ class VcpkgRunner { } // If running in a GitHub Runner, enable the GH's cache provider for the vcpkg's binary cache. if (process.env['GITHUB_ACTIONS'] === 'true') { - // Allow users to define the vcpkg's binary source explicitly in the workflow, in that case don't override it. - if (!process.env[globals.VCPKG_BINARY_SOURCES]) - this.baseUtils.setVariableVerbose(globals.VCPKG_BINARY_SOURCES, VcpkgRunner.VCPKG_BINARY_SOURCES_GHA); + yield this.baseUtils.wrapOp(`Setup to run on GitHub Action runners`, () => __awaiter(this, void 0, void 0, function* () { + // Allow users to define the vcpkg's binary source explicitly in the workflow, in that case don't override it. + if (!process.env[globals.VCPKG_BINARY_SOURCES]) + this.baseUtils.setVariableVerbose(globals.VCPKG_BINARY_SOURCES, VcpkgRunner.VCPKG_BINARY_SOURCES_GHA); + })); } // Ensuring `this.vcpkgDestPath` is existent, since is going to be used as current working directory. if (!(yield this.baseUtils.baseLib.exist(this.vcpkgDestPath))) { diff --git a/package-lock.json b/package-lock.json index e4672082..802bc82a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,11 +14,11 @@ "@actions/exec": "^1.1.1", "@actions/github": "^5.0.3", "@actions/io": "^1.1.2", - "@lukka/action-lib": "3.5.1", - "@lukka/assets-lib": "3.5.1", - "@lukka/base-lib": "3.5.1", - "@lukka/base-util-lib": "3.5.1", - "@lukka/run-vcpkg-lib": "3.5.1", + "@lukka/action-lib": "3.5.2", + "@lukka/assets-lib": "3.5.2", + "@lukka/base-lib": "3.5.2", + "@lukka/base-util-lib": "3.5.2", + "@lukka/run-vcpkg-lib": "3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/jest": "^26.0.14", @@ -1363,9 +1363,9 @@ } }, "node_modules/@lukka/action-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/action-lib/3.5.1/e34cf68ac51e892a180070634599a2577dcf31b5", - "integrity": "sha512-U1A8UMJiigfqyuERmbepiFlxoBxAAHZARbm/q4tikuhAGXMRo05DvQ5ypTEW2Uti0okrCwi/hF063w2Ha0ooeQ==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/action-lib/3.5.2/260efdaf184168e792d78c3c3be99370af0bb366", + "integrity": "sha512-MFJkFsFuX6tAobpkLVDoa+vZAkqEPzPChNs/R8YfdmD1dAIol/Lpa1Rk3+AmfQUpy0ov55CMVOCfsa0eKHBjGQ==", "license": "MIT", "dependencies": { "@actions/core": "^1.9.1", @@ -1373,8 +1373,8 @@ "@actions/github": "^5.0.3", "@actions/glob": "^0.3.0", "@actions/io": "^1.1.2", - "@lukka/base-lib": "^3.5.1", - "@lukka/base-util-lib": "^3.5.1", + "@lukka/base-lib": "^3.5.2", + "@lukka/base-util-lib": "^3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/q": "^1.5.1", @@ -1808,15 +1808,15 @@ } }, "node_modules/@lukka/assets-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/assets-lib/3.5.1/1ed4fdc57bd3a56f1531101644181c6c56188bff", - "integrity": "sha512-OL7TXFL/6mgyiKt7UEStPXQdsRpebMxEHHwpyu9by401zC9GdEs8a8z9ajclfXgWNHpjN9bpfMg5679I4J3agw==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/assets-lib/3.5.2/1a52f2781470136377671cbbb4be1b50774f595c", + "integrity": "sha512-Wee8YlihVWrJiSI9ZxLT83j67udHH0oTAfoNvVZ4n7Y5QG8YaYbVoq+0baGTcrXt+TMMyPyDcq3EfY/zHjOZfg==", "license": "MIT" }, "node_modules/@lukka/base-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/base-lib/3.5.1/9eb1450ff87d6b6a9166da100df05f4cbf4a71a9", - "integrity": "sha512-CA1ea23sxAZDEGUFrTb1CsjlOjcgmalgNkGdDlGcY3zujzJ+i0Yl44kPuuv2kw9I2G2RlckCH/p768ox4ivRtw==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/base-lib/3.5.2/27ce2e4e559b7d5376387816599001715aba29cd", + "integrity": "sha512-o4Z+hEooL6RPCvbq/3dpId2l2TpHC/Q27l4FW7TQyLyG93wgGAyEBOzVf0dndH8j4LcxI2a+qfT2M7ljBBOSAA==", "license": "MIT", "dependencies": { "@types/adm-zip": "^0.4.32", @@ -2252,12 +2252,12 @@ } }, "node_modules/@lukka/base-util-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/base-util-lib/3.5.1/cd0fa81dbd1aaaaa1734257546e0d23d2a59f3a6", - "integrity": "sha512-sKgFI/6K88XdceCNWtPxQJGWwK6taCjFb2rdqNXKn+VicLyAgGDHO4rIzYxkTICtf44N42gxVS0mF99NshqcAQ==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/base-util-lib/3.5.2/c98407b1eaa317571499ba36ac89378f976bd519", + "integrity": "sha512-FXJMzXMzVgpZVMe9tGtZaJ/ZSG5l0SkINPLtN4Xqe1dh7mzo7AywJLBS0m2PahNI6WU+uYEUeh3xnyoOSJmmXA==", "license": "MIT", "dependencies": { - "@lukka/base-lib": "^3.5.1", + "@lukka/base-lib": "^3.5.2", "fast-glob": "3.2.7" } }, @@ -2277,14 +2277,14 @@ } }, "node_modules/@lukka/run-vcpkg-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/run-vcpkg-lib/3.5.1/ac6c6f5f83465a99bff177e0ea16fdfb4e68fe5a", - "integrity": "sha512-Wp5yilF+h4OhhOLy2250aj2iO5dOCit7yDNuEa1LW+IyGvPBf9xoUcmZeNT1k9HYCsy+Pe9oNwtc+tkc3VKyZg==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/run-vcpkg-lib/3.5.2/b4f2f50ebc7051ec28a27f680165acc4eeb63502", + "integrity": "sha512-6NMQHekO2BDS0RracI+RBRJf2AR8/uRZ/vrnRBYWlFS1iXObCYNMWiDVZVs9NusAB/b5n5JpaL4WIOiR22cMRw==", "license": "MIT", "dependencies": { - "@lukka/action-lib": "^3.5.1", - "@lukka/base-lib": "^3.5.1", - "@lukka/base-util-lib": "^3.5.1", + "@lukka/action-lib": "^3.5.2", + "@lukka/base-lib": "^3.5.2", + "@lukka/base-util-lib": "^3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/q": "^1.5.1", @@ -14182,17 +14182,17 @@ } }, "@lukka/action-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/action-lib/3.5.1/e34cf68ac51e892a180070634599a2577dcf31b5", - "integrity": "sha512-U1A8UMJiigfqyuERmbepiFlxoBxAAHZARbm/q4tikuhAGXMRo05DvQ5ypTEW2Uti0okrCwi/hF063w2Ha0ooeQ==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/action-lib/3.5.2/260efdaf184168e792d78c3c3be99370af0bb366", + "integrity": "sha512-MFJkFsFuX6tAobpkLVDoa+vZAkqEPzPChNs/R8YfdmD1dAIol/Lpa1Rk3+AmfQUpy0ov55CMVOCfsa0eKHBjGQ==", "requires": { "@actions/core": "^1.9.1", "@actions/exec": "^1.1.1", "@actions/github": "^5.0.3", "@actions/glob": "^0.3.0", "@actions/io": "^1.1.2", - "@lukka/base-lib": "^3.5.1", - "@lukka/base-util-lib": "^3.5.1", + "@lukka/base-lib": "^3.5.2", + "@lukka/base-util-lib": "^3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/q": "^1.5.1", @@ -14522,14 +14522,14 @@ } }, "@lukka/assets-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/assets-lib/3.5.1/1ed4fdc57bd3a56f1531101644181c6c56188bff", - "integrity": "sha512-OL7TXFL/6mgyiKt7UEStPXQdsRpebMxEHHwpyu9by401zC9GdEs8a8z9ajclfXgWNHpjN9bpfMg5679I4J3agw==" + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/assets-lib/3.5.2/1a52f2781470136377671cbbb4be1b50774f595c", + "integrity": "sha512-Wee8YlihVWrJiSI9ZxLT83j67udHH0oTAfoNvVZ4n7Y5QG8YaYbVoq+0baGTcrXt+TMMyPyDcq3EfY/zHjOZfg==" }, "@lukka/base-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/base-lib/3.5.1/9eb1450ff87d6b6a9166da100df05f4cbf4a71a9", - "integrity": "sha512-CA1ea23sxAZDEGUFrTb1CsjlOjcgmalgNkGdDlGcY3zujzJ+i0Yl44kPuuv2kw9I2G2RlckCH/p768ox4ivRtw==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/base-lib/3.5.2/27ce2e4e559b7d5376387816599001715aba29cd", + "integrity": "sha512-o4Z+hEooL6RPCvbq/3dpId2l2TpHC/Q27l4FW7TQyLyG93wgGAyEBOzVf0dndH8j4LcxI2a+qfT2M7ljBBOSAA==", "requires": { "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", @@ -14860,11 +14860,11 @@ } }, "@lukka/base-util-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/base-util-lib/3.5.1/cd0fa81dbd1aaaaa1734257546e0d23d2a59f3a6", - "integrity": "sha512-sKgFI/6K88XdceCNWtPxQJGWwK6taCjFb2rdqNXKn+VicLyAgGDHO4rIzYxkTICtf44N42gxVS0mF99NshqcAQ==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/base-util-lib/3.5.2/c98407b1eaa317571499ba36ac89378f976bd519", + "integrity": "sha512-FXJMzXMzVgpZVMe9tGtZaJ/ZSG5l0SkINPLtN4Xqe1dh7mzo7AywJLBS0m2PahNI6WU+uYEUeh3xnyoOSJmmXA==", "requires": { - "@lukka/base-lib": "^3.5.1", + "@lukka/base-lib": "^3.5.2", "fast-glob": "3.2.7" }, "dependencies": { @@ -14883,13 +14883,13 @@ } }, "@lukka/run-vcpkg-lib": { - "version": "3.5.1", - "resolved": "https://npm.pkg.github.com/download/@lukka/run-vcpkg-lib/3.5.1/ac6c6f5f83465a99bff177e0ea16fdfb4e68fe5a", - "integrity": "sha512-Wp5yilF+h4OhhOLy2250aj2iO5dOCit7yDNuEa1LW+IyGvPBf9xoUcmZeNT1k9HYCsy+Pe9oNwtc+tkc3VKyZg==", + "version": "3.5.2", + "resolved": "https://npm.pkg.github.com/download/@lukka/run-vcpkg-lib/3.5.2/b4f2f50ebc7051ec28a27f680165acc4eeb63502", + "integrity": "sha512-6NMQHekO2BDS0RracI+RBRJf2AR8/uRZ/vrnRBYWlFS1iXObCYNMWiDVZVs9NusAB/b5n5JpaL4WIOiR22cMRw==", "requires": { - "@lukka/action-lib": "^3.5.1", - "@lukka/base-lib": "^3.5.1", - "@lukka/base-util-lib": "^3.5.1", + "@lukka/action-lib": "^3.5.2", + "@lukka/base-lib": "^3.5.2", + "@lukka/base-util-lib": "^3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/q": "^1.5.1", diff --git a/package.json b/package.json index e15277ff..8335637e 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,11 @@ "@actions/exec": "^1.1.1", "@actions/github": "^5.0.3", "@actions/io": "^1.1.2", - "@lukka/action-lib": "3.5.1", - "@lukka/assets-lib": "3.5.1", - "@lukka/base-lib": "3.5.1", - "@lukka/base-util-lib": "3.5.1", - "@lukka/run-vcpkg-lib": "3.5.1", + "@lukka/action-lib": "3.5.2", + "@lukka/assets-lib": "3.5.2", + "@lukka/base-lib": "3.5.2", + "@lukka/base-util-lib": "3.5.2", + "@lukka/run-vcpkg-lib": "3.5.2", "@types/adm-zip": "^0.4.32", "@types/follow-redirects": "^1.14.1", "@types/jest": "^26.0.14", diff --git a/src/vcpkg-action.ts b/src/vcpkg-action.ts index d5b33780..8a6542ef 100644 --- a/src/vcpkg-action.ts +++ b/src/vcpkg-action.ts @@ -66,8 +66,9 @@ export class VcpkgAction { // Ensure vcpkg root is set. if (!vcpkgRoot) { vcpkgRoot = await runvcpkglib.getDefaultVcpkgDirectory(this.baseUtilLib.baseLib); - baseLib.info(`The vcpkg's root directory is not provided, using the predefined: '${this.vcpkgRootDir}'`); + baseLib.info(`The vcpkg's root directory is not provided, using the default value: '${this.vcpkgRootDir}'`); } + baseLib.info(`The vpckg root directory: '${vcpkgRoot}'`); // Create the vcpkg_root and cache directory if needed. const binCachePath: string = this.binaryCachePath ?? await runvcpkglib.getDefaultVcpkgCacheDirectory(this.baseUtilLib.baseLib); @@ -77,7 +78,6 @@ export class VcpkgAction { // Set the place where vcpkg is putting the binary caching artifacts. this.baseUtilLib.baseLib.setVariable(VcpkgAction.VCPKG_DEFAULT_BINARY_CACHE, binCachePath); - return vcpkgRoot; }); @@ -85,10 +85,12 @@ export class VcpkgAction { throw new Error(`vcpkgRootDir is not defined!`); } - let vcpkgJsonFilePath: string | null = null; - const vcpkgJsonPath = await vcpkgutil.Utils.getVcpkgJsonPath( - this.baseUtilLib, this.vcpkgJsonGlob, this.vcpkgJsonIgnores); - vcpkgJsonFilePath = await this.getCurrentDirectoryForRunningVcpkg(vcpkgJsonPath); + const vcpkgJsonFilePath: string | null = + await this.baseUtilLib.wrapOp(`Searching for vcpkg.json with glob expression '${this.vcpkgJsonGlob}'`, async () => { + const vcpkgJsonPath = await vcpkgutil.Utils.getVcpkgJsonPath( + this.baseUtilLib, this.vcpkgJsonGlob, this.vcpkgJsonIgnores); + return await this.getCurrentDirectoryForRunningVcpkg(vcpkgJsonPath); + }); let isCacheHit: boolean | null = null; let cacheKey: baseutillib.KeySet | null = null; @@ -96,13 +98,13 @@ export class VcpkgAction { this.baseUtilLib.baseLib.debug(`Skipping restoring vcpkg as caching is disabled. Set input 'doNotCache:false' to enable caching.`); } else { cacheKey = - await this.baseUtilLib.wrapOp('Compute vcpkg cache key', async () => { + await this.baseUtilLib.wrapOp('Computing vcpkg cache key', async () => { const keys = await vcpkgutil.Utils.computeCacheKeys( this.baseUtilLib, this.vcpkgRootDir as string, // HACK: if it were not set it would have thrown before. this.userProvidedCommitId); - if (keys && vcpkgJsonPath) { + if (keys) { baseLib.info(`Computed key: ${JSON.stringify(keys)}`); } else { throw new Error("Computation for the cache key failed!"); diff --git a/src/vcpkg-utils.ts b/src/vcpkg-utils.ts index 29414b9b..21da96de 100644 --- a/src/vcpkg-utils.ts +++ b/src/vcpkg-utils.ts @@ -9,7 +9,6 @@ import * as baselib from '@lukka/base-lib' import * as baseutillib from '@lukka/base-util-lib' import * as cache from '@actions/cache' import * as fastglob from "fast-glob" -import { doNotCacheInput } from './vcpkg-action' export class Utils {