Skip to content

Commit

Permalink
fix the version of run-vcpkg to v7 in the readme.md file
Browse files Browse the repository at this point in the history
consume v1.0.28 of packages
simplify logCollectionRegExps
  • Loading branch information
lukka committed Jul 6, 2021
1 parent 9c0ae56 commit caea17d
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 51 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -66,7 +66,7 @@ jobs:

# Restore from cache the previously built ports. If a "cache miss" occurs, then vcpkg is bootstrapped. Since a the vcpkg.json is being used later on to install the packages when run-cmake runs, no packages are installed at this time and the input 'setupOnly:true' is mandatory.
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v6
uses: lukka/run-vcpkg@v7
with:
# Just install vcpkg for now, do not install any ports in this step yet.
setupOnly: true
Expand Down Expand Up @@ -98,7 +98,7 @@ When `setupOnly: true`, it only setups `vcpkg` without installing any port. The
# Restore from cache the previously built ports. If cache-miss, download and build vcpkg (aka "bootstrap vcpkg").
- name: Restore from cache and install vcpkg
# Download and build vcpkg, without installing any port. If content is cached already, it is a no-op.
uses: lukka/run-vcpkg@v6
uses: lukka/run-vcpkg@v7
with:
setupOnly: true
# Now that vcpkg is installed, it is being used to run with the desired arguments.
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -56,7 +56,7 @@ inputs:
required: false
description: "Disable the automatic caching mechanism by setting it to true. Default is false."
logCollectionRegExps:
default: "\\s*See also \"(.+CMakeOutput\\.log)\"\\.\\s*;\\s*See also \"(.+CMakeError\\.log)\"\\.\\s*;\\s*See logs for more information:\\s*(.+out\\.log)\\s*;\\s+(.+err\\.log)\\s*"
default: "\\s*\"(.+CMakeOutput\\.log)\"\\.\\s*;\\s*\"(.+CMakeError\\.log)\"\\.\\s*;\\s*(.+out\\.log)\\s*;\\s+(.+err\\.log)\\s*"
required: false
description: "Specifies a semicolon separated list of regular expressions that are used to identify log file paths in the workflow output. A regular expression must have a single capturing group, that is a single pair of parenthesis such as 'See also (.+.log)'. When a match occurs, the content of the file is written into the workflow output for disclosing its content to the user. The default regular expressions are for CMake's and vcpkg's log files."

Expand Down
14 changes: 12 additions & 2 deletions dist/index.js
Expand Up @@ -5334,6 +5334,8 @@ class LogFileCollector {
}
handleOutput(buffer) {
this.appendBuffer(buffer);
this.baseLib.debug(`\n\nappending: ${buffer}\n\n`);
this.baseLib.debug(`\n\nbuffer: ${this.bufferString}\n\n`);
let consumedUntil = -1;
for (const re of this.regExps) {
re.lastIndex = 0;
Expand All @@ -5343,6 +5345,7 @@ class LogFileCollector {
const matches = re.exec(this.bufferString);
if (matches) {
consumedUntil = Math.max(consumedUntil, re.lastIndex);
this.baseLib.debug(`\n\nmatched expression: ${re}\n\n`);
this.func(matches[1]);
}
}
Expand All @@ -5352,6 +5355,7 @@ class LogFileCollector {
}
}
this.limitBuffer(consumedUntil);
this.baseLib.debug(`\n\nremaining: ${this.bufferString}\n\n`);
}
}
exports.LogFileCollector = LogFileCollector;
Expand All @@ -5363,7 +5367,11 @@ function dumpFile(baseLib, filePath) {
if (content) {
baseLib.info(`[LogCollection][Start]File:'${filePath}':\n${content}\n[LogCollection][End]File:'${filePath}'.`);
}
else
baseLib.warning(`[LogCollection][Warn]File empty:'${filePath}'.`);
}
else
baseLib.warning(`[LogCollection][Warn]File not found:'${filePath}'.`);
}
catch (err) {
dumpError(baseLib, err);
Expand Down Expand Up @@ -5548,8 +5556,10 @@ class VcpkgRunner {
silent: false,
windowsVerbatimArguments: false,
env: process.env,
stdout: (t) => this.logFilesCollector.handleOutput(t),
stderr: (t) => this.logFilesCollector.handleOutput(t),
listeners: {
stdout: (t) => this.logFilesCollector.handleOutput(t),
stderr: (t) => this.logFilesCollector.handleOutput(t),
}
};
}
run() {
Expand Down
14 changes: 12 additions & 2 deletions dist/post/index.js
Expand Up @@ -5346,6 +5346,8 @@ class LogFileCollector {
}
handleOutput(buffer) {
this.appendBuffer(buffer);
this.baseLib.debug(`\n\nappending: ${buffer}\n\n`);
this.baseLib.debug(`\n\nbuffer: ${this.bufferString}\n\n`);
let consumedUntil = -1;
for (const re of this.regExps) {
re.lastIndex = 0;
Expand All @@ -5355,6 +5357,7 @@ class LogFileCollector {
const matches = re.exec(this.bufferString);
if (matches) {
consumedUntil = Math.max(consumedUntil, re.lastIndex);
this.baseLib.debug(`\n\nmatched expression: ${re}\n\n`);
this.func(matches[1]);
}
}
Expand All @@ -5364,6 +5367,7 @@ class LogFileCollector {
}
}
this.limitBuffer(consumedUntil);
this.baseLib.debug(`\n\nremaining: ${this.bufferString}\n\n`);
}
}
exports.LogFileCollector = LogFileCollector;
Expand All @@ -5375,7 +5379,11 @@ function dumpFile(baseLib, filePath) {
if (content) {
baseLib.info(`[LogCollection][Start]File:'${filePath}':\n${content}\n[LogCollection][End]File:'${filePath}'.`);
}
else
baseLib.warning(`[LogCollection][Warn]File empty:'${filePath}'.`);
}
else
baseLib.warning(`[LogCollection][Warn]File not found:'${filePath}'.`);
}
catch (err) {
dumpError(baseLib, err);
Expand Down Expand Up @@ -5560,8 +5568,10 @@ class VcpkgRunner {
silent: false,
windowsVerbatimArguments: false,
env: process.env,
stdout: (t) => this.logFilesCollector.handleOutput(t),
stderr: (t) => this.logFilesCollector.handleOutput(t),
listeners: {
stdout: (t) => this.logFilesCollector.handleOutput(t),
stderr: (t) => this.logFilesCollector.handleOutput(t),
}
};
}
run() {
Expand Down
78 changes: 38 additions & 40 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Expand Up @@ -42,10 +42,10 @@
"@actions/exec": "^1.0.1",
"@actions/github": "^1.1.0",
"@actions/io": "^1.0.1",
"@lukka/action-lib": "1.0.25",
"@lukka/base-lib": "1.0.25",
"@lukka/base-util-lib": "1.0.25",
"@lukka/run-vcpkg-lib": "1.0.25",
"@lukka/action-lib": "1.0.28",
"@lukka/base-lib": "1.0.28",
"@lukka/base-util-lib": "1.0.28",
"@lukka/run-vcpkg-lib": "1.0.28",
"@types/adm-zip": "^0.4.32",
"@types/follow-redirects": "^1.8.0",
"@types/jest": "^24.9.0",
Expand Down

0 comments on commit caea17d

Please sign in to comment.