mirror of
https://github.com/audacity/audacity-actions.git
synced 2025-12-10 03:56:07 -06:00
Fixes Conan cache cleanup
This commit is contained in:
parent
e04c171711
commit
91655062ef
@ -146,14 +146,6 @@ async function run() {
|
||||
|
||||
try{
|
||||
await configureAudacity();
|
||||
|
||||
try {
|
||||
// If upload fails - do nt fail the build
|
||||
await conan.uploadBinaries();
|
||||
} catch(error) {
|
||||
helpers.error(error.message);
|
||||
}
|
||||
|
||||
await conan.cleanupConanBuilds();
|
||||
} catch(error) {
|
||||
helpers.error(error.message);
|
||||
|
||||
10
dist/configure/index.js
vendored
10
dist/configure/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
23
lib/conan.js
23
lib/conan.js
@ -55,29 +55,9 @@ async function restoreConanCache(key) {
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadBinaries() {
|
||||
const globber = await glob.create(`${workspaceDir}/.conan/data/**/build`);
|
||||
const files = await globber.glob();
|
||||
|
||||
if (files.length == 0) {
|
||||
helpers.log('No new binaries were built. Skipping upload.');
|
||||
return;
|
||||
}
|
||||
const remote = process.env['CONAN_BINARIES_REMOTE'];
|
||||
|
||||
if (remote) {
|
||||
try {
|
||||
await helpers.execWithLog(`conan remote add audacity-binaries-upload ${remote} true --force`);
|
||||
} finally {
|
||||
await helpers.execWithLog(`conan upload "*" -r audacity-binaries-upload -c --all`);
|
||||
await helpers.execWithLog(`conan remote remove audacity-binaries-upload`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function cleanupConanBuilds() {
|
||||
helpers.log("Cleaning up conan build cache");
|
||||
await helpers.execWithLog('conan remove "*" --src --builds --force')
|
||||
await helpers.execWithLog('conan cache clean "*"')
|
||||
}
|
||||
|
||||
async function storeConanCache(key) {
|
||||
@ -98,5 +78,4 @@ module.exports = {
|
||||
restoreConanCache: restoreConanCache,
|
||||
cleanupConanBuilds: cleanupConanBuilds,
|
||||
storeConanCache: storeConanCache,
|
||||
uploadBinaries: uploadBinaries,
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user