From 771bc3b7d234ece0bebda36b66aa94a19238723b Mon Sep 17 00:00:00 2001 From: dal Date: Wed, 7 May 2025 08:33:17 -0600 Subject: [PATCH] cli release with libpq error resolve --- .github/workflows/cli-release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml index 7dc9d6994..6526914fd 100644 --- a/.github/workflows/cli-release.yml +++ b/.github/workflows/cli-release.yml @@ -53,6 +53,23 @@ jobs: - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 + - name: Install libpq (macOS and Linux) + run: | + if [[ "${{ runner.os }}" == "macOS" ]]; then + brew install libpq + echo "PKG_CONFIG_PATH=$(brew --prefix libpq)/lib/pkgconfig" >> $GITHUB_ENV + echo "LIBRARY_PATH=$(brew --prefix libpq)/lib" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$(brew --prefix libpq)/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + # For macOS, we might need to explicitly tell rustc where to find the library. + # Adding common libpq paths to rustflags + echo "RUSTFLAGS=-L $(brew --prefix libpq)/lib" >> $GITHUB_ENV + elif [[ "${{ runner.os }}" == "Linux" ]]; then + sudo apt-get update -y + sudo apt-get install -y libpq-dev + fi + env: + HOMEBREW_NO_INSTALL_CLEANUP: 1 # Recommended for CI to speed up + - name: Configure Cargo for optimized build run: | mkdir -p .cargo