1
0
mirror of https://github.com/tensorchord/pgvecto.rs.git synced 2025-04-18 21:44:00 +03:00
pgvecto.rs/build.envd
2024-03-15 02:10:07 +00:00

50 lines
1.3 KiB
Plaintext

# syntax=v1
def build():
base(dev=True)
shell("zsh")
install.apt_packages(
name=[
"bison",
"build-essential",
"ccache",
"flex",
"gcc",
"git",
"gnupg",
"libreadline-dev",
"libssl-dev",
"libxml2-dev",
"libxml2-utils",
"libxslt-dev",
"lsb-release",
"pkg-config",
"tzdata",
"xsltproc",
"zlib1g-dev",
]
)
run(
commands=[
"echo 'deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-16 main' | sudo tee -a /etc/apt/sources.list",
"wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -",
"sudo apt-get update",
"sudo apt-get install -y clang-16",
]
)
runtime.environ(extra_path=["/home/envd/.cargo/bin"])
run(
commands=[
"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
]
)
run(
commands=[
"export PGRX=$(grep -o \"pgrx = { version = \\\"=[^\\\"]*\" Cargo.toml | cut -d = -f 4)",
"cargo install cargo-pgrx --version $PGRX",
"cargo pgrx init",
],
mount_host=True,
)