Skip to content

Commit

Permalink
fix(ci/compiler): Remove KeySetCache directory on mac os CI to avoid …
Browse files Browse the repository at this point in the history
…space disk issues
  • Loading branch information
BourgerieQuentin committed Feb 19, 2024
1 parent c53985f commit b07013f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/compiler_macos_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ jobs:
- name: Test
run: |
set -e
export KEY_CACHE_DIRECTORY=$(mktemp -d)/KeySetCache
echo "KEY_CACHE_DIRECTORY=$KEY_CACHE_DIRECTORY" >> "${GITHUB_ENV}"
mkdir $KEY_CACHE_DIRECTORY
cd compilers/concrete-compiler/compiler
echo "Debug: ccache statistics (prior to the tests):"
ccache -s
Expand All @@ -97,3 +101,8 @@ jobs:
make MINIMAL_TESTS=${{ env.MINIMAL_TESTS }} Python3_EXECUTABLE=$(which python3.10) run-tests
echo "Debug: ccache statistics (after the tests):"
ccache -s
- name: Cleanup host
if: success() || failure()
run: |
rm -rf $KEY_CACHE_DIRECTORY
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ static inline std::optional<concretelang::keysets::KeysetCache>
getTestKeySetCache() {

llvm::SmallString<0> cachePath;
llvm::sys::path::system_temp_directory(true, cachePath);
llvm::sys::path::append(cachePath, CACHE_PATH);

if (auto envCachepath = std::getenv("KEY_CACHE_DIRECTORY")) {
cachePath.append(envCachepath);
} else {
llvm::sys::path::system_temp_directory(true, cachePath);
llvm::sys::path::append(cachePath, CACHE_PATH);
}

auto cachePathStr = std::string(cachePath);

Expand Down

0 comments on commit b07013f

Please sign in to comment.