mirror of
https://github.com/audacity/audacity-actions.git
synced 2025-12-10 03:56:07 -06:00
Install Conan 2 on CI
This commit is contained in:
parent
a79ab34704
commit
e04c171711
@ -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
|
||||
|
||||
3
dependencies/action.yml
vendored
3
dependencies/action.yml
vendored
@ -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
4
dist/build/index.js
vendored
File diff suppressed because one or more lines are too long
4
dist/configure/index.js
vendored
4
dist/configure/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/generate_offline_dependencies/index.js
vendored
2
dist/generate_offline_dependencies/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/update_recipes/index.js
vendored
2
dist/update_recipes/index.js
vendored
File diff suppressed because one or more lines are too long
@ -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 = {
|
||||
|
||||
64
lib/debug.js
64
lib/debug.js
@ -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,
|
||||
}
|
||||
|
||||
@ -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, [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user