Get Julia versions from versions.json (#24)

This replaces the hardcoded versions array which will decouple the setup-julia version and the installable Julia versions.
This commit is contained in:
Sascha Mann
2020-11-08 15:06:21 +01:00
committed by GitHub
parent c5d801f77b
commit 45f46ba622
8 changed files with 5098 additions and 98 deletions

7
lib/setup-julia.js generated
View File

@@ -54,15 +54,16 @@ function run() {
if (!arch) {
throw new Error(`Arch input must not be null`);
}
const availableReleases = installer.juliaVersions;
const versionInfo = yield installer.getJuliaVersionInfo();
const availableReleases = yield installer.getJuliaVersions(versionInfo);
const version = installer.getJuliaVersion(availableReleases, versionInput);
core.debug(`selected Julia version: ${arch}/${version}`);
// Search in cache
let juliaPath;
juliaPath = tc.find('julia', version, arch);
if (!juliaPath) {
core.debug(`could not find Julia ${version} in cache`);
const juliaInstallationPath = yield installer.installJulia(version, arch);
core.debug(`could not find Julia ${arch}/${version} in cache`);
const juliaInstallationPath = yield installer.installJulia(versionInfo, version, arch);
// Add it to cache
juliaPath = yield tc.cacheDir(juliaInstallationPath, 'julia', version, arch);
core.debug(`added Julia to cache: ${juliaPath}`);