From 827c7c3af492652c40928fbb18bdfa7d64323f64 Mon Sep 17 00:00:00 2001 From: Keming Date: Fri, 30 Aug 2024 17:51:48 +0800 Subject: [PATCH] fix build in enterprise ci (#580) Signed-off-by: Keming --- .github/workflows/release_enterprise.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release_enterprise.yml b/.github/workflows/release_enterprise.yml index d7cd09b79..db28e3fb8 100644 --- a/.github/workflows/release_enterprise.yml +++ b/.github/workflows/release_enterprise.yml @@ -79,27 +79,17 @@ jobs: 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 - - name: Set up Pgrx - run: | - # pg_config - mkdir -p ~/.pg_config - touch ~/.pg_config/pg_config - chmod 777 ~/.pg_config/pg_config - echo "#!/usr/bin/env bash" >> ~/.pg_config/pg_config - echo "$(pwd)/tools/pg_config.sh \"\$@\" < $(pwd)/vendor/pg_config/pg${VERSION}_${ARCH}-unknown-linux-gnu.txt" >> ~/.pg_config/pg_config - mkdir -p ~/.pgrx && echo "configs.pg$VERSION=\"$HOME/.pg_config/pg_config\"" > ~/.pgrx/config.toml - # pgrx_binding - mkdir -p ~/.pgrx_binding - cp ./vendor/pgrx_binding/pg${VERSION}_$(uname --machine)-unknown-linux-gnu.rs ~/.pgrx_binding/pg${VERSION}_raw_bindings.rs - echo PGRX_TARGET_INFO_PATH_PG$VERSION=$HOME/.pgrx_binding >> "$GITHUB_ENV" + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 128 - name: Schema run: | echo -n $PGVECTORS_SCHEMA > .schema sed -i "/schema/ c\schema = $PGVECTORS_SCHEMA" ./vectors.control - name: Build run: | - cargo build --lib --no-default-features --features pg$VERSION --release --target $ARCH-unknown-linux-gnu - ./tools/schema.sh --no-default-features --features pg$VERSION --release --target $ARCH-unknown-linux-gnu | expand -t 4 > ./target/vectors--$SEMVER.sql + export PGRX_PG_CONFIG_PATH=$(pwd)/vendor/pg${VERSION}_${ARCH}_debian/pg_config/pg_config + export PGRX_TARGET_INFO_PATH_PG$VERSION=$(pwd)/vendor/pg${VERSION}_${ARCH}_debian/pgrx_binding + cargo build --package pgvectors --lib --features pg$VERSION --target $ARCH-unknown-linux-gnu --release + ./tools/schema.sh --features pg$VERSION --target $ARCH-unknown-linux-gnu --release | expand -t 4 > ./target/schema.sql - name: Package run: | export PLATFORM=$(echo $ARCH | sed 's/aarch64/arm64/; s/x86_64/amd64/')