Compare commits

1 Commits
v1 ... main

Author SHA1 Message Date
8d84405a1d 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
2024-11-26 17:07:29 +13:00
4 changed files with 26 additions and 21 deletions

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="116" height="20" role="img" aria-label="Coverage: 15.11%"><title>Coverage: 15.11%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="116" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="53" height="20" fill="#e05d44"/><rect width="116" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="885" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">15.11%</text><text x="885" y="140" transform="scale(.1)" fill="#fff" textLength="430">15.11%</text></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="116" height="20" role="img" aria-label="Coverage: 14.94%"><title>Coverage: 14.94%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="116" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="53" height="20" fill="#e05d44"/><rect width="116" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="885" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">14.94%</text><text x="885" y="140" transform="scale(.1)" fill="#fff" textLength="430">14.94%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

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

View File

@@ -15,28 +15,31 @@ export async function run(): Promise<void> {
}
const downloadPath = await download(clangVersion)
const downloadRequirementsPath = await 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}`
)
if (process.platform == 'linux') {
const downloadRequirementsPath = await downloadRequirements()
core.info(
`LD_LIBRARY_PATH: ${requirementsLib}${path.delimiter}${lib}${path.delimiter}${ld}`
)
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