Merge pull request #135 from abeimler/bugfix/issue-125-2 [skip ci]

This commit is contained in:
Amin Yahyaabadi 2022-10-29 01:36:52 -07:00 committed by GitHub
commit 3dbe25a6dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 23 additions and 22 deletions

View File

@ -63,6 +63,7 @@ words:
- patha - patha
- pnpm - pnpm
- pwsh - pwsh
- pygments
- pypy - pypy
- setupcpp - setupcpp
- setx - setx

View File

@ -9,16 +9,12 @@ commandTests:
command: g++ command: g++
args: ["--version"] args: ["--version"]
expectedOutput: [".*g\\+\\+.*GCC.*"] expectedOutput: [".*g\\+\\+.*GCC.*"]
- name: cmake
command: cmake
args: ["--version"]
expectedOutput: [".*cmake version.*"]
- name: make - name: make
command: make command: make
args: ["--version"] args: ["--version"]
expectedOutput: [".*GNU Make.*"] expectedOutput: [".*GNU Make.*"]
- name: ninja - name: ninja
command: ninja command: /root/ninja/ninja
args: ["--version"] args: ["--version"]
expectedOutput: [".*1.*"] expectedOutput: [".*1.*"]
- name: gcovr - name: gcovr

View File

@ -9,16 +9,12 @@ commandTests:
command: g++ command: g++
args: ["--version"] args: ["--version"]
expectedOutput: [".*g\\+\\+.*GCC.*"] expectedOutput: [".*g\\+\\+.*GCC.*"]
- name: cmake
command: cmake
args: ["--version"]
expectedOutput: [".*cmake version.*"]
- name: make - name: make
command: make command: make
args: ["--version"] args: ["--version"]
expectedOutput: [".*GNU Make.*"] expectedOutput: [".*GNU Make.*"]
- name: ninja - name: ninja
command: ninja command: /root/ninja/ninja
args: ["--version"] args: ["--version"]
expectedOutput: [".*1.*"] expectedOutput: [".*1.*"]
- name: gcovr - name: gcovr
@ -33,10 +29,6 @@ commandTests:
command: doxygen command: doxygen
args: ["--version"] args: ["--version"]
expectedOutput: [".*1.*"] expectedOutput: [".*1.*"]
- name: cppcheck
command: cppcheck
args: ["--version"]
expectedOutput: [".*Cppcheck.*"]
fileExistenceTests: fileExistenceTests:
- name: "vcpkg" - name: "vcpkg"

View File

@ -15,7 +15,7 @@ COPY "./dist/node12" "/"
WORKDIR "/" WORKDIR "/"
# run installation # run installation
RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --vcpkg true --doxygen true --gcovr true --task true RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --cppcheck true --ccache true --vcpkg true --doxygen true --gcovr true --task true
# TODO fails! # TODO fails!
# --cppcheck true # --cppcheck true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,8 @@ import { setupGraphviz } from "./graphviz/graphviz"
import { setupNala } from "./nala/nala" import { setupNala } from "./nala/nala"
import { setupBazel } from "./bazel/bazel" import { setupBazel } from "./bazel/bazel"
import { setupPowershell } from "./powershell/powershell" import { setupPowershell } from "./powershell/powershell"
import { isArch } from "./utils/env/isArch"
import { setupPacmanPack } from "./utils/setup/setupPacmanPack"
/** The setup functions */ /** The setup functions */
const setups = { const setups = {
@ -162,6 +164,15 @@ export async function main(args: string[]): Promise<number> {
let hasLLVM = false // used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler let hasLLVM = false // used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler
// install python-pygments to avoid conflicts with cppcheck and gcovr on arch linux
if (process.platform === "linux") {
if (isArch()) {
if (opts.cppcheck && opts.gcovr) {
setupPacmanPack("python-pygments")
}
}
}
// loop over the tools and run their setup function // loop over the tools and run their setup function
for (const tool of tools) { for (const tool of tools) {
// get the version or "true" or undefined for this tool from the options // get the version or "true" or undefined for this tool from the options

View File

@ -12,14 +12,15 @@ export function setupPacmanPack(name: string, version?: string, aur?: string): I
const pacman = "pacman" const pacman = "pacman"
if (!didUpdate) { // yay can't run as root, so skip update
execRootSync(pacman, ["-Syuu", "--noconfirm"]) if (!didUpdate && aur !== "yay") {
execRootSync(pacman, ["-Sy", "--noconfirm"])
didUpdate = true didUpdate = true
} }
if (!didInit) { if (!didInit) {
// install base-devel // install base-devel
execRootSync(pacman, ["-Sy", "--noconfirm", "base-devel"]) execRootSync(pacman, ["-S", "--noconfirm", "base-devel"])
didInit = true didInit = true
} }