From 0ce5f4c11ecc59c719109f94c2a260431ec04b6f Mon Sep 17 00:00:00 2001 From: imsk17 Date: Sat, 16 Mar 2024 22:43:06 +0530 Subject: [PATCH] CI: Configure LibPQ for actions --- .github/workflows/Build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 8141d34..be161e9 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -39,6 +39,27 @@ jobs: target: ${{ matrix.target }} override: true + - name: Install postgres (Windows) + if: matrix.os == 'windows-latest' + shell: bash + run: | + choco install postgresql12 --force --params '/Password:root' + echo "C:\Program Files\PostgreSQL\12\bin" >> $GITHUB_PATH + echo "C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_PATH + echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_ENV + + - name: Install postgres (MacOS M1) + if: matrix.os == 'macos-14' || matrix.os == 'macos-latest' + run: | + brew install postgresql + brew services start postgresql@14 + + - name: Install postgres (Linux) + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libpq-dev postgresql + - name: Build run: cargo build --release --target ${{ matrix.target }}