fix: only download requirements on linux
All checks were successful
Check Transpiled JavaScript / Check dist/ (push) Successful in 1m6s
Continuous Integration / TypeScript Tests (push) Successful in 1m16s
Continuous Integration / GitHub Actions Test (push) Successful in 15s

This commit is contained in:
2024-11-26 17:07:29 +13:00
parent 821c8a3610
commit 8d84405a1d
4 changed files with 26 additions and 21 deletions

12
dist/index.js generated vendored
View File

@@ -28427,15 +28427,17 @@ async function run() {
clangVersion = await (0, download_1.getLatestVersion)();
}
const downloadPath = await (0, download_1.download)(clangVersion);
const downloadRequirementsPath = await (0, download_1.downloadRequirements)();
const bin = path.join(downloadPath, 'bin');
const lib = path.join(downloadPath, 'lib');
const requirementsLib = path.join(path.join(downloadRequirementsPath, 'lib'), 'x86_64-linux-gnu');
core.addPath(bin);
core.exportVariable('LLVM_PATH', downloadPath);
const ld = process.env.LD_LIBRARY_PATH ?? '';
core.exportVariable('LD_LIBRARY_PATH', `${requirementsLib}${path.delimiter}${lib}${path.delimiter}${ld}`);
core.info(`LD_LIBRARY_PATH: ${requirementsLib}${path.delimiter}${lib}${path.delimiter}${ld}`);
if (process.platform == 'linux') {
const downloadRequirementsPath = await (0, download_1.downloadRequirements)();
const requirementsLib = path.join(path.join(downloadRequirementsPath, 'lib'), 'x86_64-linux-gnu');
const ld = process.env.LD_LIBRARY_PATH ?? '';
core.exportVariable('LD_LIBRARY_PATH', `${requirementsLib}${path.delimiter}${lib}${path.delimiter}${ld}`);
core.info(`LD_LIBRARY_PATH: ${requirementsLib}${path.delimiter}${lib}${path.delimiter}${ld}`);
}
// Ensure system libraries are first on ARM64 macOS to avoid issues with Apple's libc++ being weird.
// https://discourse.llvm.org/t/apples-libc-now-provides-std-type-descriptor-t-functionality-not-found-in-upstream-libc/73881/5
const dyld = process.env.DYLD_LIBRARY_PATH;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long