forked from trueagi-io/hyperon-experimental
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-hyperonc.sh
More file actions
executable file
·50 lines (43 loc) · 1.32 KB
/
install-hyperonc.sh
File metadata and controls
executable file
·50 lines (43 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
HYPERONC_URL=https://github.com/trueagi-io/hyperon-experimental.git
HYPERONC_REV=main
while getopts 'u:r:' opt; do
case "$opt" in
u)
HYPERONC_URL="$OPTARG"
;;
r)
HYPERONC_REV="$OPTARG"
;;
?|h)
echo "Usage: $(basename $0) [-u hyperonc_repo_url] [-r hyperonc_revision]"
exit 1
;;
esac
done
echo "hyperonc repository URL $HYPERONC_URL"
echo "hyperonc revision $HYPERONC_REV"
# This is to build subunit from Conan on CentOS based manylinux images.
if test "$AUDITWHEEL_POLICY" = "manylinux2014"; then
yum install -y perl-devel
fi
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh
sh /tmp/rustup.sh -y && rm /tmp/rustup.sh
export PATH="${PATH}:${HOME}/.cargo/bin"
cargo install cbindgen
python3 -m pip install conan==1.60.2 pip==23.1.2
PATH="${PATH}:${HOME}/.local/bin"
conan profile new --detect default
mkdir -p ${HOME}/hyperonc
cd ${HOME}/hyperonc
git init
git remote add origin $HYPERONC_URL
git fetch --depth=1 origin $HYPERONC_REV
git reset --hard FETCH_HEAD
mkdir -p ${HOME}/hyperonc/c/build
cd ${HOME}/hyperonc/c/build
# Rust doesn't support building shared libraries under musllinux environment
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release ..
make
make check
make install