cli release with libpq error resolve

This commit is contained in:
dal 2025-05-07 08:33:17 -06:00
parent 256bbbb934
commit 771bc3b7d2
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 17 additions and 0 deletions

View File

@ -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