mirror of https://github.com/aminya/setup-cpp
feat: add doxygen - fix cppcheck
This commit is contained in:
parent
10883e7f0e
commit
c8b9b73c4e
|
@ -26,5 +26,4 @@ The package will be usable from any environment (locally, GitHub Actions, etc).
|
|||
- [x] setup ccache
|
||||
- [ ] setup gcc/mingw
|
||||
- [ ] setup OpenCppCoverage
|
||||
- [ ] setup doxygen
|
||||
- [ ] setup vcpkg
|
||||
|
|
|
@ -36,6 +36,12 @@ inputs:
|
|||
ccache:
|
||||
description: "The ccache version to install."
|
||||
required: false
|
||||
doxygen:
|
||||
description: "The doxygen version to install."
|
||||
required: false
|
||||
cppcheck:
|
||||
description: "The cppcheck version to install."
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "node12"
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import { setupDoxygen } from "../doxygen"
|
||||
import { spawnSync as spawn } from "child_process"
|
||||
|
||||
jest.setTimeout(200000)
|
||||
describe("setup-doxygen", () => {
|
||||
it("should setup doxygen", async () => {
|
||||
await setupDoxygen()
|
||||
|
||||
const { status } = spawn("doxygen", ["--version"], {
|
||||
encoding: "utf8",
|
||||
})
|
||||
expect(status).toBe(0)
|
||||
})
|
||||
})
|
|
@ -0,0 +1,23 @@
|
|||
import { setupAptPack } from "../utils/setup/setupAptPack"
|
||||
import { setupBrewPack } from "../utils/setup/setupBrewPack"
|
||||
import { setupChocoPack } from "../utils/setup/setupChocoPack"
|
||||
|
||||
export async function setupDoxygen(version?: string) {
|
||||
switch (process.platform) {
|
||||
case "win32": {
|
||||
await setupChocoPack("graphviz", version)
|
||||
return setupChocoPack("doxygen.install", version)
|
||||
}
|
||||
case "darwin": {
|
||||
await setupBrewPack("graphviz", version)
|
||||
return setupBrewPack("doxygen", version)
|
||||
}
|
||||
case "linux": {
|
||||
await setupAptPack("graphviz", version)
|
||||
return setupAptPack("doxygen", version)
|
||||
}
|
||||
default: {
|
||||
throw new Error(`Unsupported platform`)
|
||||
}
|
||||
}
|
||||
}
|
14
src/main.ts
14
src/main.ts
|
@ -4,6 +4,8 @@ import { setupCcache } from "./ccache/ccache"
|
|||
import { setupChocolatey } from "./chocolatey/chocolatey"
|
||||
import { setupCmake } from "./cmake/cmake"
|
||||
import { setupConan } from "./conan/conan"
|
||||
import { setupCppcheck } from "./cppcheck/cppcheck"
|
||||
import { setupDoxygen } from "./doxygen/doxygen"
|
||||
import { setupGcovr } from "./gcovr/gcovr"
|
||||
import { setupLLVM } from "./llvm/llvm"
|
||||
import { setupMeson } from "./meson/meson"
|
||||
|
@ -83,6 +85,18 @@ export async function main(): Promise<number> {
|
|||
await setupCcache(ccacheVersion)
|
||||
}
|
||||
|
||||
// setup doxygen
|
||||
const doxygenVersion = maybeGetInput("doxygen")
|
||||
if (doxygenVersion !== undefined) {
|
||||
await setupDoxygen(doxygenVersion)
|
||||
}
|
||||
|
||||
// setup cppCheck
|
||||
const cppCheckVersion = maybeGetInput("cppcheck")
|
||||
if (cppCheckVersion !== undefined) {
|
||||
await setupCppcheck(cppCheckVersion)
|
||||
}
|
||||
|
||||
// setup msvc
|
||||
const msvcVersion = maybeGetInput("msvc")
|
||||
if (msvcVersion !== undefined) {
|
||||
|
|
Loading…
Reference in New Issue