2024-08-24 06:20:37 +08:00
|
|
|
import { setupBrew } from "setup-brew"
|
2024-08-16 06:22:07 +08:00
|
|
|
import { setupBazel } from "./bazel/bazel.js"
|
|
|
|
import { setupCcache } from "./ccache/ccache.js"
|
|
|
|
import { setupChocolatey } from "./chocolatey/chocolatey.js"
|
|
|
|
import { setupCmake } from "./cmake/cmake.js"
|
2024-09-18 05:53:47 +08:00
|
|
|
import { setupCmakelang } from "./cmakelang/cmakelang.js"
|
2024-08-16 06:22:07 +08:00
|
|
|
import { setupConan } from "./conan/conan.js"
|
|
|
|
import { setupCppcheck } from "./cppcheck/cppcheck.js"
|
|
|
|
import { setupDoxygen } from "./doxygen/doxygen.js"
|
2024-09-18 05:32:10 +08:00
|
|
|
import { setupGcc, setupMingw } from "./gcc/gcc.js"
|
2024-08-16 06:22:07 +08:00
|
|
|
import { setupGcovr } from "./gcovr/gcovr.js"
|
|
|
|
import { setupGraphviz } from "./graphviz/graphviz.js"
|
|
|
|
import { setupKcov } from "./kcov/kcov.js"
|
2024-09-18 05:32:10 +08:00
|
|
|
import { setupAppleClang } from "./llvm/apple-clang.js"
|
2024-08-16 06:22:07 +08:00
|
|
|
import { setupClangFormat, setupClangTools, setupLLVM } from "./llvm/llvm.js"
|
|
|
|
import { setupMake } from "./make/make.js"
|
|
|
|
import { setupMeson } from "./meson/meson.js"
|
|
|
|
import { setupMSVC } from "./msvc/msvc.js"
|
|
|
|
import { setupNala } from "./nala/nala.js"
|
|
|
|
import { setupNinja } from "./ninja/ninja.js"
|
|
|
|
import { setupOpencppcoverage } from "./opencppcoverage/opencppcoverage.js"
|
|
|
|
import { setupPowershell } from "./powershell/powershell.js"
|
|
|
|
import { setupPython } from "./python/python.js"
|
|
|
|
import { setupSccache } from "./sccache/sccache.js"
|
|
|
|
import { setupSevenZip } from "./sevenzip/sevenzip.js"
|
|
|
|
import { setupTask } from "./task/task.js"
|
|
|
|
import { setupVcpkg } from "./vcpkg/vcpkg.js"
|
|
|
|
import { setupVCVarsall } from "./vcvarsall/vcvarsall.js"
|
2024-09-19 12:33:02 +08:00
|
|
|
import { setupCpplint } from "./cpplint/cpplint.js"
|
2023-05-25 14:48:26 +08:00
|
|
|
|
2024-09-18 05:32:10 +08:00
|
|
|
export const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, "clang++": setupLLVM } as const
|
|
|
|
export const gccSetups = { gcc: setupGcc, "g++": setupGcc } as const
|
|
|
|
export const mingwSetups = { mingw: setupMingw } as const
|
|
|
|
export const msvcSetups = {
|
|
|
|
msvc: setupMSVC,
|
|
|
|
cl: setupMSVC,
|
|
|
|
msbuild: setupMSVC,
|
|
|
|
visualstudio: setupMSVC,
|
|
|
|
} as const
|
|
|
|
export const appleClangSetups = {
|
|
|
|
appleclang: setupAppleClang,
|
|
|
|
applellvm: setupAppleClang,
|
|
|
|
"apple-clang": setupAppleClang,
|
|
|
|
"apple-llvm": setupAppleClang,
|
|
|
|
} as const
|
|
|
|
|
2024-09-18 05:53:47 +08:00
|
|
|
const cmakeLangSetups = {
|
|
|
|
cmakelang: setupCmakelang,
|
|
|
|
"cmake-lint": setupCmakelang,
|
|
|
|
"cmake-format": setupCmakelang,
|
|
|
|
cmakelint: setupCmakelang,
|
|
|
|
cmakeformat: setupCmakelang,
|
|
|
|
} as const
|
|
|
|
|
2024-09-18 05:32:10 +08:00
|
|
|
export const llvmTools = ["llvm", "clang", "clang++", "clang-tidy", "clang-format", "clangtidy", "clangformat"]
|
|
|
|
|
2023-08-22 11:11:21 +08:00
|
|
|
/** The setup functions */
|
2023-05-25 14:48:26 +08:00
|
|
|
export const setups = {
|
2024-09-18 05:53:47 +08:00
|
|
|
nala: setupNala,
|
|
|
|
brew: setupBrew,
|
|
|
|
choco: setupChocolatey,
|
|
|
|
python: setupPython,
|
|
|
|
powershell: setupPowershell,
|
|
|
|
pwsh: setupPowershell,
|
2024-09-18 05:32:10 +08:00
|
|
|
...llvmSetups,
|
|
|
|
...gccSetups,
|
|
|
|
...mingwSetups,
|
|
|
|
...msvcSetups,
|
|
|
|
...appleClangSetups,
|
2024-09-18 05:53:47 +08:00
|
|
|
...cmakeLangSetups,
|
2023-05-25 14:48:26 +08:00
|
|
|
cmake: setupCmake,
|
|
|
|
ninja: setupNinja,
|
|
|
|
vcpkg: setupVcpkg,
|
|
|
|
bazel: setupBazel,
|
|
|
|
conan: setupConan,
|
|
|
|
meson: setupMeson,
|
|
|
|
gcovr: setupGcovr,
|
|
|
|
opencppcoverage: setupOpencppcoverage,
|
2024-09-18 05:32:10 +08:00
|
|
|
OpenCppCoverage: setupOpencppcoverage,
|
2023-05-25 14:48:26 +08:00
|
|
|
ccache: setupCcache,
|
|
|
|
sccache: setupSccache,
|
|
|
|
doxygen: setupDoxygen,
|
|
|
|
graphviz: setupGraphviz,
|
|
|
|
cppcheck: setupCppcheck,
|
2024-09-19 12:33:02 +08:00
|
|
|
cpplint: setupCpplint,
|
2024-09-18 05:32:10 +08:00
|
|
|
"clang-tidy": setupClangTools,
|
2023-05-25 14:48:26 +08:00
|
|
|
clangtidy: setupClangTools,
|
2024-09-18 05:32:10 +08:00
|
|
|
"clang-format": setupClangFormat,
|
2023-09-11 14:58:16 +08:00
|
|
|
clangformat: setupClangFormat,
|
2023-05-25 14:48:26 +08:00
|
|
|
vcvarsall: setupVCVarsall,
|
|
|
|
kcov: setupKcov,
|
|
|
|
make: setupMake,
|
|
|
|
task: setupTask,
|
|
|
|
sevenzip: setupSevenZip,
|
2024-09-18 05:32:10 +08:00
|
|
|
"7zip": setupSevenZip,
|
|
|
|
"7z": setupSevenZip,
|
|
|
|
} as const
|
2023-05-25 14:48:26 +08:00
|
|
|
|
|
|
|
export type ToolName = keyof typeof setups
|
|
|
|
|
2023-08-22 11:11:21 +08:00
|
|
|
/** The tools that can be installed */
|
2023-05-25 14:48:26 +08:00
|
|
|
export const tools = Object.keys(setups) as Array<ToolName>
|
|
|
|
|
2023-08-22 12:41:17 +08:00
|
|
|
/** The possible inputs to the program */
|
|
|
|
export type Inputs = keyof typeof setups | "compiler" | "architecture" | "timeout"
|
2023-08-22 11:21:34 +08:00
|
|
|
|
2024-08-24 06:20:37 +08:00
|
|
|
/** An array of possible inputs */
|
2023-08-22 12:41:17 +08:00
|
|
|
export const inputs: Array<Inputs> = ["compiler", "architecture", "timeout", ...tools]
|