Skip to content

Commit 430733d

Browse files
authored
ci: fix update_vendor (#496)
* ci: fix update_vendor Signed-off-by: usamoi <usamoi@outlook.com> * chore: update vendor --------- Signed-off-by: usamoi <usamoi@outlook.com>
1 parent d7d8d0b commit 430733d

8 files changed

+21644
-1680
lines changed

.github/workflows/update_vendor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424
uses: docker/setup-qemu-action@v3
2525
- name: Generate
2626
run: |
27-
export PGRX=$(grep -o 'pgrx = { version = "=[^"]*' Cargo.toml | cut -d = -f 4)
27+
export BRANCH=$(grep -o 'pgrx = { git = "https://github.com/tensorchord/pgrx.git", branch = "[^"]*' Cargo.toml | cut -d '"' -f 4)
2828
docker run --rm --platform linux/amd64 -v ./:/mnt/build \
29-
-e "VERSION=14" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
29+
-e "VERSION=14" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
3030
docker run --rm --platform linux/amd64 -v ./:/mnt/build \
31-
-e "VERSION=15" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
31+
-e "VERSION=15" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
3232
docker run --rm --platform linux/amd64 -v ./:/mnt/build \
33-
-e "VERSION=16" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
33+
-e "VERSION=16" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
3434
docker run --rm --platform linux/arm64 -v ./:/mnt/build \
35-
-e "VERSION=14" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
35+
-e "VERSION=14" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
3636
docker run --rm --platform linux/arm64 -v ./:/mnt/build \
37-
-e "VERSION=15" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
37+
-e "VERSION=15" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
3838
docker run --rm --platform linux/arm64 -v ./:/mnt/build \
39-
-e "VERSION=16" -e "PGRX=$PGRX" debian:buster bash /mnt/build/scripts/update_vendor.sh &
39+
-e "VERSION=16" -e "BRANCH=$BRANCH" debian:buster bash /mnt/build/scripts/update_vendor.sh &
4040
wait
4141
sudo chown -R $USER ./vendor
4242
- name: Create Pull Request

scripts/update_vendor.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
set -e
33

44
printf "VERSION = ${VERSION}\n"
5-
printf "PGRX = ${PGRX}\n"
5+
printf "BRANCH = ${BRANCH}\n"
66

77
apt-get update
8-
apt-get install -y --no-install-recommends ca-certificates curl build-essential gnupg lsb-release wget
8+
apt-get install -y --no-install-recommends ca-certificates curl build-essential gnupg lsb-release wget git
99

1010
echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | tee -a /etc/apt/sources.list.d/pgdg.list
1111
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
@@ -18,7 +18,7 @@ source ~/.cargo/env
1818
cd $(mktemp -d)
1919

2020
cargo init --lib --name vectors
21-
cargo add pgrx-pg-sys@=$PGRX --no-default-features --features pg$VERSION
21+
cargo add pgrx-pg-sys --git https://github.com/tensorchord/pgrx.git --branch $BRANCH --no-default-features --features pg$VERSION
2222
PGRX_PG_CONFIG_PATH=$(which pg_config) PGRX_PG_SYS_EXTRA_OUTPUT_PATH=$(pwd)/pgrx-binding.rs cargo build
2323
rustfmt ./pgrx-binding.rs
2424

0 commit comments

Comments
 (0)