Skip to content

Commit

Permalink
fix log output
Browse files Browse the repository at this point in the history
  • Loading branch information
lukka committed Apr 3, 2023
1 parent e3b09b3 commit e8860dd
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 72 deletions.
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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.
┌─────────────────────────┐
Expand All @@ -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`
└────────────┬────────────┘
Expand All @@ -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
Expand All @@ -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.
└────────────┬────────────┘
|
Expand Down
8 changes: 5 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44136,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))) {
Expand Down
94 changes: 47 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/vcpkg-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit e8860dd

Please sign in to comment.