From b45e469a444feaafe88732cbc2f2deda56d2f632 Mon Sep 17 00:00:00 2001 From: rudy Date: Mon, 25 Apr 2022 09:29:14 +0200 Subject: [PATCH] feat(ci): macos, fix keysetcache use --- .github/workflows/continuous-integration.yml | 2 +- compiler/Makefile | 2 +- compiler/lib/ClientLib/KeySetCache.cpp | 1 + compiler/tests/unittest/end_to_end_jit_test.h | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f9f393da1..4c4d8edf7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -276,7 +276,7 @@ jobs: if: github.event_name == 'push' run: | cd compiler - GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make keysetcache_ci_populated + KEYSETCACHECI="$TMPDIR/KeySetCache" GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make keysetcache_ci_populated - name: Test if: github.event_name == 'push' diff --git a/compiler/Makefile b/compiler/Makefile index 6c74bda92..382825742 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -9,7 +9,7 @@ CONCRETE_OPTIMIZER_DIR ?= .dependencies/concrete-optimizer CONCRETE_OPTIMIZER_BRANCH ?= master KEYSETCACHEDEV=/tmp/KeySetCache -KEYSETCACHECI=../KeySetCache +KEYSETCACHECI ?= ../KeySetCache export PATH := $(BUILD_DIR)/bin:$(PATH) diff --git a/compiler/lib/ClientLib/KeySetCache.cpp b/compiler/lib/ClientLib/KeySetCache.cpp index 9338a45eb..96f3e0d16 100644 --- a/compiler/lib/ClientLib/KeySetCache.cpp +++ b/compiler/lib/ClientLib/KeySetCache.cpp @@ -237,6 +237,7 @@ KeySetCache::loadOrGenerateSave(ClientParameters ¶ms, uint64_t seed_msb, return loadKeys(params, seed_msb, seed_lsb, std::string(folderPath)); } + std::cerr << "KeySetCache: miss, regenerating \n"; OUTCOME_TRY(auto key_set, KeySet::generate(params, seed_msb, seed_lsb)); OUTCOME_TRYV(saveKeys(*key_set, folderPath)); diff --git a/compiler/tests/unittest/end_to_end_jit_test.h b/compiler/tests/unittest/end_to_end_jit_test.h index 388ad45e7..318a7fb5e 100644 --- a/compiler/tests/unittest/end_to_end_jit_test.h +++ b/compiler/tests/unittest/end_to_end_jit_test.h @@ -114,6 +114,9 @@ getTestKeySetCache() { llvm::sys::path::append(cachePath, "KeySetCache"); auto cachePathStr = std::string(cachePath); + + std::cout << "Using KeySetCache dir: " << cachePathStr << "\n"; + return llvm::Optional( concretelang::clientlib::KeySetCache(cachePathStr)); }