From 10cf6decf2393b3a5940f06bb76f61576938e883 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Wed, 10 Apr 2024 10:55:41 +0200 Subject: [PATCH] chore(c_api): fix build on M1 mac --- .github/workflows/m1_tests.yml | 7 +++++++ tfhe/c_api_tests/test_boolean_keygen.c | 2 +- tfhe/c_api_tests/test_boolean_server_key.c | 2 +- tfhe/c_api_tests/test_high_level_zk.c | 3 +-- tfhe/c_api_tests/test_micro_bench_and.c | 2 +- tfhe/c_api_tests/test_shortint_keygen.c | 2 +- tfhe/c_api_tests/test_shortint_pbs.c | 2 +- tfhe/c_api_tests/test_shortint_server_key.c | 2 +- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/m1_tests.yml b/.github/workflows/m1_tests.yml index ebbba24ad7..67e4a935ee 100644 --- a/.github/workflows/m1_tests.yml +++ b/.github/workflows/m1_tests.yml @@ -86,6 +86,13 @@ jobs: run: | make test_boolean + # Because we do "illegal" things with the build system which Cargo does not seem to like much + # we need to clear the cache to make sure the C API is built properly and does not use a stale + # cached version + - name: Clear build cache + run: | + cargo clean + - name: Run C API tests run: | make test_c_api diff --git a/tfhe/c_api_tests/test_boolean_keygen.c b/tfhe/c_api_tests/test_boolean_keygen.c index 4fcb6f240b..b5883444f3 100644 --- a/tfhe/c_api_tests/test_boolean_keygen.c +++ b/tfhe/c_api_tests/test_boolean_keygen.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include diff --git a/tfhe/c_api_tests/test_boolean_server_key.c b/tfhe/c_api_tests/test_boolean_server_key.c index 3e2ec93735..6d271ff567 100644 --- a/tfhe/c_api_tests/test_boolean_server_key.c +++ b/tfhe/c_api_tests/test_boolean_server_key.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include diff --git a/tfhe/c_api_tests/test_high_level_zk.c b/tfhe/c_api_tests/test_high_level_zk.c index 83a3e977dc..45323a7caa 100644 --- a/tfhe/c_api_tests/test_high_level_zk.c +++ b/tfhe/c_api_tests/test_high_level_zk.c @@ -1,7 +1,6 @@ -#include "tfhe.h" +#include #include #include -#include int main(void) { // We want to use zk-proof, which requires bounded random distributions diff --git a/tfhe/c_api_tests/test_micro_bench_and.c b/tfhe/c_api_tests/test_micro_bench_and.c index 936474b5be..a0c5f31c7b 100644 --- a/tfhe/c_api_tests/test_micro_bench_and.c +++ b/tfhe/c_api_tests/test_micro_bench_and.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include diff --git a/tfhe/c_api_tests/test_shortint_keygen.c b/tfhe/c_api_tests/test_shortint_keygen.c index cc1cbd958a..ea9f1c0676 100644 --- a/tfhe/c_api_tests/test_shortint_keygen.c +++ b/tfhe/c_api_tests/test_shortint_keygen.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include diff --git a/tfhe/c_api_tests/test_shortint_pbs.c b/tfhe/c_api_tests/test_shortint_pbs.c index f5970ead12..3fe6589e31 100644 --- a/tfhe/c_api_tests/test_shortint_pbs.c +++ b/tfhe/c_api_tests/test_shortint_pbs.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include diff --git a/tfhe/c_api_tests/test_shortint_server_key.c b/tfhe/c_api_tests/test_shortint_server_key.c index f0dfc928f7..72d246fedf 100644 --- a/tfhe/c_api_tests/test_shortint_server_key.c +++ b/tfhe/c_api_tests/test_shortint_server_key.c @@ -1,4 +1,4 @@ -#include "tfhe.h" +#include #include #include #include