fix: add cppcheck, doxygen, and mingw to PATH on windows

This commit is contained in:
Amin Yahyaabadi 2021-09-16 09:19:56 -05:00
parent 39993729df
commit c61f0e5307
3 changed files with 21 additions and 7 deletions

View File

@ -1,12 +1,15 @@
import { addPath } from "@actions/core"
import { setupAptPack } from "../utils/setup/setupAptPack"
import { setupBrewPack } from "../utils/setup/setupBrewPack"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function setupCppcheck(version: string | undefined, _setupCppDir: string, _arch: string) {
export async function setupCppcheck(version: string | undefined, _setupCppDir: string, _arch: string) {
switch (process.platform) {
case "win32": {
return setupChocoPack("cppcheck", version)
await setupChocoPack("cppcheck", version)
addPath("C:\\Program Files\\Cppcheck")
break
}
case "darwin": {
return setupBrewPack("cppcheck", version)

View File

@ -1,3 +1,4 @@
import { addPath } from "@actions/core"
import { setupAptPack } from "../utils/setup/setupAptPack"
import { setupBrewPack } from "../utils/setup/setupBrewPack"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
@ -7,10 +8,13 @@ export async function setupDoxygen(version: string | undefined, _setupCppDir: st
switch (process.platform) {
case "win32": {
await setupChocoPack("graphviz", version)
return setupChocoPack("doxygen.install", version)
await setupChocoPack("doxygen.install", version)
addPath("C:\\Program Files\\Graphviz\\bin")
addPath("C:\\Program Files\\doxygen\\bin")
break
}
case "darwin": {
await setupBrewPack("graphviz", version)
setupBrewPack("graphviz", version)
return setupBrewPack("doxygen", version)
}
case "linux": {

View File

@ -1,15 +1,22 @@
import { addPath } from "@actions/core"
import { setupAptPack } from "../utils/setup/setupAptPack"
import { setupBrewPack } from "../utils/setup/setupBrewPack"
import { setupChocoPack } from "../utils/setup/setupChocoPack"
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function setupGcc(version: string, _setupCppDir: string, arch: string) {
export async function setupGcc(version: string, _setupCppDir: string, arch: string) {
switch (process.platform) {
case "win32": {
if (arch === "arm" || arch === "arm64") {
return setupChocoPack("gcc-arm-embedded", version)
await setupChocoPack("gcc-arm-embedded", version)
}
return setupChocoPack("mingw", version)
await setupChocoPack("mingw", version)
if (arch === "x64") {
addPath("C:\\tools\\mingw64\\bin")
} else if (arch === "ia32") {
addPath("C:\\tools\\mingw32\\bin")
}
break
}
case "darwin": {
return setupBrewPack("gcc", version)