Skip to content

Commit bcd2a42

Browse files
authored
Merge pull request #257 from aminya/vcpkg-version
2 parents 55af62e + 315189b commit bcd2a42

File tree

13 files changed

+165
-120
lines changed

13 files changed

+165
-120
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ exe/
1717
*.log
1818
*.exe
1919
.cache/
20+
21+
coverage

biome.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"**/dist/**",
88
"dev/cpp_vcpkg_project/**/*",
99
"**/.venv/",
10-
"**/.*cache/"
10+
"**/.*cache/",
11+
"**/coverage/"
1112
],
1213
"ignoreUnknown": true
1314
},

dist/actions/setup-cpp.js

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.js

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/llvm/llvm.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ export async function setupLLVM(version: string, setupDir: string, arch: string)
2323
}
2424

2525
async function setupLLVMWithoutActivation_raw(version: string, setupDir: string, arch: string) {
26-
// install LLVM and its dependencies in parallel
27-
const [installationInfo, _1, _2] = await Promise.all([
26+
// install LLVM
27+
const [installationInfo, _1] = await Promise.all([
2828
setupLLVMOnly(version, setupDir, arch),
29-
setupLLVMDeps(arch),
3029
addLLVMLoggingMatcher(),
3130
])
3231

32+
// install LLVM dependencies
33+
await setupLLVMDeps(arch)
34+
3335
return installationInfo
3436
}
3537
const setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_raw, { isPromise: true })

src/llvm/llvm_installer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { execa } from "execa"
44
import { chmod, readFile, writeFile } from "fs/promises"
55
import { DEFAULT_TIMEOUT } from "../installTool"
66
import { addPath } from "../utils/env/addEnv"
7-
import { hasNala, isPackageRegexInstalled, setupAptPack } from "../utils/setup/setupAptPack"
7+
import { aptTimeout, hasNala, isPackageRegexInstalled, setupAptPack } from "../utils/setup/setupAptPack"
88
import type { InstallationInfo } from "../utils/setup/setupBin"
99

1010
export enum LLVMPackages {
@@ -70,16 +70,16 @@ function nonInteractiveScript(script: string) {
7070
// make the scirpt non-interactive and fix broken packages
7171
return script.replace(
7272
/add-apt-repository "\${REPO_NAME}"/g,
73-
// eslint-disable-next-line no-template-curly-in-string
74-
"add-apt-repository -y \"${REPO_NAME}\"",
73+
`add-apt-repository -y -n "\${REPO_NAME}"
74+
apt-get update -o ${aptTimeout} -y`,
7575
)
7676
}
7777

7878
async function removeConflictingPackages(givenScript: string) {
7979
// fix conflicts between libclang-rt and libclang
8080
let script = givenScript.replace(
8181
/apt-get install -y/g,
82-
"apt-get install -o Dpkg::Options::=\"--force-overwrite\" -y --fix-broken",
82+
`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${aptTimeout} -y --fix-broken`,
8383
)
8484

8585
// check if these are installed and if so, remove them from the script as they conflict

0 commit comments

Comments
 (0)