Install Conan 2 on CI

This commit is contained in:
Dmitry Vedenko 2023-06-23 21:53:46 +03:00
parent a79ab34704
commit e04c171711
No known key found for this signature in database
GPG Key ID: F4C37A6204F983A2
9 changed files with 11 additions and 76 deletions

View File

@ -146,7 +146,6 @@ async function run() {
try{
await configureAudacity();
await debug.processDependenciesDebugInformation(buildDir, buildType, true);
try {
// If upload fails - do nt fail the build

View File

@ -85,8 +85,7 @@ runs:
- name: Generate requirements
shell: bash
run: |
echo "markupsafe==2.0.1" > requirements.txt
echo "conan==1.59.0" >> requirements.txt
echo "conan==2.0.7" > requirements.txt
- name: Setup Python
uses: actions/setup-python@v4
with:

4
dist/build/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -89,8 +89,7 @@ async function storeConanCache(key) {
}
async function setupConan() {
core.exportVariable('CONAN_USER_HOME', workspaceDir);
core.exportVariable('CONAN_REVISIONS_ENABLED', '1');
core.exportVariable('CONAN_HOME', `${workspaceDir}/.conan`);
}
module.exports = {

View File

@ -246,27 +246,6 @@ async function getMatchingFiles(mainPatterns, controlPatterns, skipExt) {
});
}
async function splitDepsDebugSymbols(extension, splitter, performUpload) {
const files = await getMatchingFiles(
path.join(conanCachePath, 'data/**/package/**/*' + extension),
path.join(conanCachePath, 'data/**/build/**/*' + extension)
);
let debugFiles = []
for(const file of files) {
const debugPath = await splitter(file);
if (debugPath.length > 0) {
debugFiles.push(debugPath);
}
}
if (performUpload && debugFiles.length > 0) {
await uploadAllToSentry([...debugFiles, ...files])
}
}
async function splitAudacityDebugSymbols(buildDir, buildType, extension, splitter, performUpload) {
const binDir = path.join(buildDir, buildType);
@ -279,7 +258,7 @@ async function splitAudacityDebugSymbols(buildDir, buildType, extension, splitte
const systemLibraries = await getMatchingFiles(
`${binDir}/**/*${extension}`,
`${conanCachePath}/**/package/**/*${extension}`);
`${conanCachePath}/**/p/**/*${extension}`);
const libraries = (await fileUtils.globFiles(`${binDir}/**/*${extension}`)).filter(file => {
const stat = fs.lstatSync(file);
@ -307,46 +286,6 @@ async function splitAudacityDebugSymbols(buildDir, buildType, extension, splitte
}
}
async function processDependenciesDebugInformation(buildDir, buildType, performUpload) {
if (process.platform == 'win32') {
// On Windows, nothing needs to be done
// if we are processeing dependencies and
// no upload is needed
if (!performUpload || !artifactorySymbolsURL) {
return;
}
if(!symstoreFound) {
helpers.error("symstore.exe is not available");
return;
}
// Collect PDBs
const pdbs = await fileUtils.globFiles([
path.join(conanCachePath, 'data/**/build/**/*.pdb'),
'C:/.conan/**/*.pdb'
]);
for(const pdb of pdbs) {
await addToSymStore(pdb);
}
if(pdbs.length > 0) {
await uploadSymStore();
const dlls = await fileUtils.globFiles([
path.join(conanCachePath, 'data/**/build/**/*.dll'),
'C:/.conan/**/*.dll'
]);
await uploadAllToSentry([...pdbs, ...dlls])
}
} else if (process.platform == 'darwin') {
await splitDepsDebugSymbols('.dylib', splitDsymFile, performUpload);
} else {
await splitDepsDebugSymbols('.so*', splitDebugFile, performUpload);
}
}
async function processDebugInformation(buildDir, buildType, performUpload) {
if (process.platform == 'win32') {
const pdbs = await fileUtils.globFiles(path.join(buildDir, `${buildType}/**/*.pdb`));
@ -388,6 +327,5 @@ async function processDebugInformation(buildDir, buildType, performUpload) {
}
module.exports = {
processDependenciesDebugInformation: processDependenciesDebugInformation,
processDebugInformation: processDebugInformation,
}

View File

@ -31,9 +31,9 @@ async function downloadConan(version) {
}
async function prepareEnvironment() {
conan = await downloadConan('1.58.0');
conan = await downloadConan('2.0.7');
core.exportVariable('CONAN_USER_HOME', conanCacheLocation);
core.exportVariable('CONAN_HOME', conanCacheLocation);
core.addPath(bin_path);
await helpers.execWithLog(conan, [