-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: usamoi <usamoi@outlook.com>
- Loading branch information
Showing
3 changed files
with
172 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
# syntax=v1 | ||
|
||
envdlib = include("https://github.com/tensorchord/envdlib") | ||
|
||
def build(): | ||
base(dev=True) | ||
install.apt_packages(name=[ | ||
"clang", | ||
"libreadline-dev", | ||
"zlib1g-dev", | ||
"flex", | ||
"bison", | ||
"libxslt-dev", | ||
"libssl-dev", | ||
"libxml2-utils", | ||
"xsltproc", | ||
"ccache", | ||
"pkg-config", | ||
]) | ||
envdlib.rust() | ||
run(commands=[ | ||
"cargo install cargo-pgrx --version 0.10.0-beta.1", | ||
"cargo pgrx init", | ||
]) | ||
config.repo(url="https://github.com/tensorchord/pgvecto.rs") | ||
base(os="ubuntu20.04", language="python3") | ||
shell("zsh") | ||
io.copy("./envd.sh", "/tmp/build/envd.sh") | ||
io.copy("./rust-toolchain.toml", "/tmp/build/rust-toolchain.toml") | ||
io.copy("./Cargo.toml", "/tmp/build/Cargo.toml") | ||
run(commands=["cd /tmp/build", "sudo -u envd ./envd.sh"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/bash | ||
|
||
sudo apt-get update | ||
sudo apt-get install -y lsb-release | ||
sudo apt-get install -y gnupg | ||
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list | ||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
sudo apt-get update | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo -E apt-get install tzdata | ||
sudo apt-get install -y build-essential | ||
sudo apt-get install -y libpq-dev | ||
sudo apt-get install -y libssl-dev | ||
sudo apt-get install -y pkg-config | ||
sudo apt-get install -y gcc | ||
sudo apt-get install -y libreadline-dev | ||
sudo apt-get install -y flex | ||
sudo apt-get install -y bison | ||
sudo apt-get install -y libxml2-dev | ||
sudo apt-get install -y libxslt-dev | ||
sudo apt-get install -y libxml2-utils | ||
sudo apt-get install -y xsltproc | ||
sudo apt-get install -y zlib1g-dev | ||
sudo apt-get install -y ccache | ||
sudo apt-get install -y clang | ||
sudo apt-get install -y git | ||
sudo apt-get install -y postgresql-15 | ||
sudo apt-get install -y postgresql-server-dev-15 | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
source "$HOME/.cargo/env" | ||
rev=$(cat Cargo.toml | grep "pgrx =" | awk -F 'rev = "' '{print $2}' | cut -d'"' -f1) | ||
cargo install cargo-pgrx --git https://github.com/tensorchord/pgrx.git --rev $rev | ||
cargo pgrx init --pg15=/usr/lib/postgresql/15/bin/pg_config | ||
sudo chmod 777 /usr/share/postgresql/15/extension/ | ||
sudo chmod 777 /usr/lib/postgresql/15/lib/ |