mirror of https://github.com/aminya/setup-cpp
feat: time the installation times
This commit is contained in:
parent
d67b16d18b
commit
18911f8ca0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -134,6 +134,7 @@ export async function main(args: string[]): Promise<number> {
|
||||||
// skip if undefined
|
// skip if undefined
|
||||||
if (version !== undefined) {
|
if (version !== undefined) {
|
||||||
// running the setup function for this tool
|
// running the setup function for this tool
|
||||||
|
console.time(`took`)
|
||||||
startGroup(`Installing ${tool} ${version}`)
|
startGroup(`Installing ${tool} ${version}`)
|
||||||
try {
|
try {
|
||||||
let installationInfo: InstallationInfo | undefined | void
|
let installationInfo: InstallationInfo | undefined | void
|
||||||
|
@ -155,6 +156,7 @@ export async function main(args: string[]): Promise<number> {
|
||||||
errorMessages.push(`${tool} failed to install`)
|
errorMessages.push(`${tool} failed to install`)
|
||||||
}
|
}
|
||||||
endGroup()
|
endGroup()
|
||||||
|
console.timeEnd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,6 +167,7 @@ export async function main(args: string[]): Promise<number> {
|
||||||
const { compiler, version } = getCompilerInfo(maybeCompiler)
|
const { compiler, version } = getCompilerInfo(maybeCompiler)
|
||||||
|
|
||||||
// install the compiler. We allow some aliases for the compiler name
|
// install the compiler. We allow some aliases for the compiler name
|
||||||
|
console.time(`took`)
|
||||||
startGroup(`Installing ${compiler} ${version ?? ""}`)
|
startGroup(`Installing ${compiler} ${version ?? ""}`)
|
||||||
switch (compiler) {
|
switch (compiler) {
|
||||||
case "llvm":
|
case "llvm":
|
||||||
|
@ -206,11 +209,13 @@ export async function main(args: string[]): Promise<number> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endGroup()
|
endGroup()
|
||||||
|
console.timeEnd()
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error(e as string | Error)
|
error(e as string | Error)
|
||||||
errorMessages.push(`Failed to install the ${maybeCompiler}`)
|
errorMessages.push(`Failed to install the ${maybeCompiler}`)
|
||||||
endGroup()
|
endGroup()
|
||||||
|
console.timeEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (successMessages.length === 0 && errorMessages.length === 0) {
|
if (successMessages.length === 0 && errorMessages.length === 0) {
|
||||||
|
|
Loading…
Reference in New Issue