Adds 'offline' conan to PATH

This commit is contained in:
Dmitry Vedenko 2022-11-08 17:26:06 +03:00
parent 92032a4edd
commit 3a66549164
No known key found for this signature in database
GPG Key ID: F4C37A6204F983A2
3 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@ const generator = core.getInput('generator') || 'Unix Makefiles';
const buildType = core.getInput('build_type') || 'Release';
async function run() {
await offlineDependencies.prepareEnvironment(core.getMultilineInput('additional_python_packages'));
await offlineDependencies.prepareEnvironment();
const tempPath = path.join(workspaceDir, '.offline', 'temp');

View File

@ -8,6 +8,8 @@ const path = require('path');
const helpers = require('../lib/helpers.js');
const offlineCacheLocation = path.join(workspaceDir, '.offline');
const bin_path = path.join(offlineCacheLocation, 'bin');
const conanCacheLocation = path.join(offlineCacheLocation, 'conan');
const conanDownloadCacheLocation = path.join(conanCacheLocation, 'download_cache');
@ -15,8 +17,6 @@ const conanDownloadCacheLocation = path.join(conanCacheLocation, 'download_cache
async function downloadConan(version) {
const cached_path = await toolCache.downloadTool(`https://github.com/audacity/conan-appimage/releases/download/v${version}/conan-${version}-x86_64.AppImage`)
const bin_path = path.join(offlineCacheLocation, 'bin');
if (!fs.existsSync(bin_path)) {
fs.mkdirSync(bin_path, { recursive: true });
}
@ -34,6 +34,7 @@ async function prepareEnvironment() {
conan = await downloadConan('1.54.0');
core.exportVariable('CONAN_USER_HOME', conanCacheLocation);
core.addPath(bin_path);
await helpers.execWithLog(conan, [
'config', 'init'