diff --git a/src/llvm/__tests__/llvm.test.ts b/src/llvm/__tests__/llvm.test.ts index 54f6c18c..c3dad45c 100644 --- a/src/llvm/__tests__/llvm.test.ts +++ b/src/llvm/__tests__/llvm.test.ts @@ -1,4 +1,5 @@ -import { getSpecificVersionAndUrl, setupLLVM } from "../llvm" +import { setupLLVM, VERSIONS, getUrl } from "../llvm" +import { getSpecificVersionAndUrl } from "../../utils/setup/version" import { isValidUrl } from "../../utils/http/validate_url" import { setupTmpDir, cleanupTmpDir } from "../../utils/tests/test-helpers" import { addBinExtension } from "../../utils/setup/setupBin" @@ -7,7 +8,7 @@ import { spawnSync as spawn } from "child_process" jest.setTimeout(200000) async function testUrl(version: string) { - const [specificVersion, url] = await getSpecificVersionAndUrl(process.platform, version) + const [specificVersion, url] = await getSpecificVersionAndUrl(VERSIONS, process.platform, version, getUrl) if (!(await isValidUrl(url))) { throw new Error(`Failed to install Version: ${version} => ${specificVersion} \n URL: ${url}`) diff --git a/src/llvm/llvm.ts b/src/llvm/llvm.ts index 2cfd82a6..9b8fd2e5 100644 --- a/src/llvm/llvm.ts +++ b/src/llvm/llvm.ts @@ -11,7 +11,7 @@ import { getSpecificVersionAndUrl, getVersions } from "../utils/setup/version" //================================================ /** The specific and minimum LLVM versions supported by this action. */ -const VERSIONS: Set = getVersions([ +export const VERSIONS: Set = getVersions([ "3.5.0", "3.5.1", "3.5.2", @@ -199,7 +199,7 @@ async function getWin32Url(version: string): Promise { } /** Gets an LLVM download URL. */ -function getUrl(platform: string, version: string): string | null | Promise { +export function getUrl(platform: string, version: string): string | null | Promise { switch (platform) { case "darwin": return getDarwinUrl(version)