mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
chore(ci): remove symlinking of the dynamic buffer API
This commit is contained in:
9
Makefile
9
Makefile
@@ -446,32 +446,23 @@ build_tfhe_coverage: install_rs_build_toolchain
|
|||||||
RUSTFLAGS="$(RUSTFLAGS) --cfg tarpaulin" cargo $(CARGO_RS_BUILD_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
RUSTFLAGS="$(RUSTFLAGS) --cfg tarpaulin" cargo $(CARGO_RS_BUILD_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
||||||
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,internal-keycache -p $(TFHE_SPEC) --tests
|
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,internal-keycache -p $(TFHE_SPEC) --tests
|
||||||
|
|
||||||
.PHONY: symlink_c_libs_without_fingerprint # Link the .a and .so files without the changing hash part in target
|
|
||||||
symlink_c_libs_without_fingerprint:
|
|
||||||
@./scripts/symlink_c_libs_without_fingerprint.sh \
|
|
||||||
--cargo-profile "$(CARGO_PROFILE)" \
|
|
||||||
--lib-name tfhe-c-api-dynamic-buffer
|
|
||||||
|
|
||||||
.PHONY: build_c_api # Build the C API for boolean, shortint and integer
|
.PHONY: build_c_api # Build the C API for boolean, shortint and integer
|
||||||
build_c_api: install_rs_check_toolchain
|
build_c_api: install_rs_check_toolchain
|
||||||
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
||||||
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,$(FORWARD_COMPAT_FEATURE) \
|
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,$(FORWARD_COMPAT_FEATURE) \
|
||||||
-p $(TFHE_SPEC)
|
-p $(TFHE_SPEC)
|
||||||
@"$(MAKE)" symlink_c_libs_without_fingerprint
|
|
||||||
|
|
||||||
.PHONY: build_c_api_gpu # Build the C API for boolean, shortint and integer
|
.PHONY: build_c_api_gpu # Build the C API for boolean, shortint and integer
|
||||||
build_c_api_gpu: install_rs_check_toolchain
|
build_c_api_gpu: install_rs_check_toolchain
|
||||||
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
||||||
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,gpu \
|
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,gpu \
|
||||||
-p $(TFHE_SPEC)
|
-p $(TFHE_SPEC)
|
||||||
@"$(MAKE)" symlink_c_libs_without_fingerprint
|
|
||||||
|
|
||||||
.PHONY: build_c_api_experimental_deterministic_fft # Build the C API for boolean, shortint and integer with experimental deterministic FFT
|
.PHONY: build_c_api_experimental_deterministic_fft # Build the C API for boolean, shortint and integer with experimental deterministic FFT
|
||||||
build_c_api_experimental_deterministic_fft: install_rs_check_toolchain
|
build_c_api_experimental_deterministic_fft: install_rs_check_toolchain
|
||||||
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_CHECK_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
|
||||||
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,experimental-force_fft_algo_dif4,$(FORWARD_COMPAT_FEATURE) \
|
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api,zk-pok,experimental-force_fft_algo_dif4,$(FORWARD_COMPAT_FEATURE) \
|
||||||
-p $(TFHE_SPEC)
|
-p $(TFHE_SPEC)
|
||||||
@"$(MAKE)" symlink_c_libs_without_fingerprint
|
|
||||||
|
|
||||||
.PHONY: build_web_js_api # Build the js API targeting the web browser
|
.PHONY: build_web_js_api # Build the js API targeting the web browser
|
||||||
build_web_js_api: install_rs_build_toolchain install_wasm_pack
|
build_web_js_api: install_rs_build_toolchain install_wasm_pack
|
||||||
|
|||||||
@@ -1,95 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
function usage() {
|
|
||||||
echo "$0: symlink C libs to names without the variable fingerprint part"
|
|
||||||
echo
|
|
||||||
echo "--help Print this message"
|
|
||||||
echo "--cargo-profile The cargo profile used"
|
|
||||||
echo "--lib-name The lib name without the lib prefix, '-' will be converted to '_'"
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
CARGO_PROFILE=""
|
|
||||||
LIBNAME=""
|
|
||||||
|
|
||||||
while [ -n "$1" ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
"--help" | "-h" )
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--cargo-profile" )
|
|
||||||
shift
|
|
||||||
CARGO_PROFILE="$1"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"--lib-name" )
|
|
||||||
shift
|
|
||||||
LIBNAME="$1"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown param : $1"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ "${CARGO_PROFILE}" == "" ]]; then
|
|
||||||
echo "CARGO_PROFILE is not set, aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${CARGO_PROFILE}" == "dev" ]]; then
|
|
||||||
# dev gets remapped
|
|
||||||
CARGO_PROFILE="debug"
|
|
||||||
fi
|
|
||||||
|
|
||||||
UNAME="$(uname)"
|
|
||||||
if [[ "${UNAME}" != "Linux" && "${UNAME}" != "Darwin" ]]; then
|
|
||||||
echo "This script is compatible with Linux and macOS and may not work for your system"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add the lib prefix
|
|
||||||
LIB_OF_INTEREST="lib${LIBNAME}"
|
|
||||||
LIB_OF_INTEREST_UNDERSCORE="${LIB_OF_INTEREST//-/_}"
|
|
||||||
|
|
||||||
CURR_DIR="$(dirname "$0")"
|
|
||||||
REPO_DIR="${CURR_DIR}/.."
|
|
||||||
OUTPUT_TARGET_DIR="${REPO_DIR}/target/${CARGO_PROFILE}"
|
|
||||||
OUTPUT_DEPS_DIR="${OUTPUT_TARGET_DIR}/deps"
|
|
||||||
|
|
||||||
cd "${OUTPUT_DEPS_DIR}"
|
|
||||||
echo "In ${PWD}"
|
|
||||||
# Find most recent file with similar name
|
|
||||||
MAYBE_STATIC_LIB="$(find . -maxdepth 1 -type f -name "${LIB_OF_INTEREST_UNDERSCORE}*.a")"
|
|
||||||
if [[ "${MAYBE_STATIC_LIB}" != "" ]]; then
|
|
||||||
STATIC_LIB="$(find . -maxdepth 1 -type f -name "${LIB_OF_INTEREST_UNDERSCORE}*.a" -print0 \
|
|
||||||
| xargs -0 ls -t | head -n 1)"
|
|
||||||
echo "Symlinking ${STATIC_LIB} to ${LIB_OF_INTEREST_UNDERSCORE}.a"
|
|
||||||
ln -snf "${STATIC_LIB}" "${LIB_OF_INTEREST_UNDERSCORE}.a"
|
|
||||||
else
|
|
||||||
echo "Could not find static lib that might correspond to $1, is there a typo in the lib name?"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DYNAMIC_LIB_EXT="so"
|
|
||||||
if [[ "${UNAME}" == "Darwin" ]]; then
|
|
||||||
DYNAMIC_LIB_EXT="dylib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
DYNAMIC_LIB_PATTERN="${LIB_OF_INTEREST_UNDERSCORE}*.${DYNAMIC_LIB_EXT}"
|
|
||||||
|
|
||||||
MAYBE_DYNAMIC_LIB="$(find . -maxdepth 1 -type f -name "${DYNAMIC_LIB_PATTERN}")"
|
|
||||||
if [[ "${MAYBE_DYNAMIC_LIB}" != "" ]]; then
|
|
||||||
DYNAMIC_LIB="$(find . -maxdepth 1 -type f -name "${DYNAMIC_LIB_PATTERN}" -print0 \
|
|
||||||
| xargs -0 ls -t | head -n 1)"
|
|
||||||
echo "Symlinking ${DYNAMIC_LIB} to ${LIB_OF_INTEREST_UNDERSCORE}.${DYNAMIC_LIB_EXT}"
|
|
||||||
ln -snf "${DYNAMIC_LIB}" "${LIB_OF_INTEREST_UNDERSCORE}.${DYNAMIC_LIB_EXT}"
|
|
||||||
else
|
|
||||||
echo "Could not find dynamic lib that might correspond to $1, is there a typo in the lib name?"
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user