From c683ce6511e2e89e0628ac29fc5ee7cc4333bd3e Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Tue, 18 Apr 2023 17:05:01 +0200 Subject: [PATCH 1/2] Prepare 0.4.8 release --- CHANGELOG.md | 6 ++++++ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a7e61..fa0c3fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All user visible changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/), as described for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/text/1105-api-evolution.md) +## [0.4.8] 2023-04-18 + +## Fixed + +- Added `wldap` as dependency for the vcpk installation on windows as that's now required there + ## [0.4.5] 2018-05-09 ### Added diff --git a/Cargo.toml b/Cargo.toml index 322ff66..76aee6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pq-sys" -version = "0.4.7" +version = "0.4.8" description = "Auto-generated rust bindings for libpq" license = "MIT OR Apache-2.0" repository = "https://github.com/sgrif/pq-sys" From b595a34d194ed937a33ba6e52a7198ce2b2976e8 Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Thu, 5 Oct 2023 17:05:02 +0200 Subject: [PATCH 2/2] Add a ci workflow --- .github/workflows/ci.yml | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ef3c851 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,83 @@ +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master + +name: CI Tests + +jobs: + check_and_test: + name: Check + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-2019] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Cache cargo registry + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} + - name: Set environment variables + shell: bash + run: | + echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV + echo "RUSTDOCFLAGS=-D warnings" >> $GITHUB_ENV + - name: Install postgres (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libpq-dev postgresql + echo "host all all 127.0.0.1/32 md5" > sudo tee -a /etc/postgresql/10/main/pg_hba.conf + sudo service postgresql restart && sleep 3 + sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" + sudo service postgresql restart && sleep 3 + + - name: Install postgres (MacOS) + if: runner.os == 'macOS' + run: | + initdb -D /usr/local/var/postgres + pg_ctl -D /usr/local/var/postgres start + sleep 3 + createuser -s postgres + + - name: Install postgres (Windows) + if: runner.os == 'Windows' + 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 rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Check + shell: bash + run: | + cargo check + - name: Tests + shell: bash + run: | + cargo test + - name: Test compile diesel + shell: bash + run: | + cargo new test_diesel + cd test_diesel + cargo add diesel --no-default-features --features "postgres" + echo "[patch.crates-io]" >> Cargo.toml + echo "pq-sys = { path = \"..\" }" >> Cargo.toml + cat Cargo.toml + echo "use diesel::prelude::*;" > src/main.rs + echo "fn main() { PgConnection::establish(\"foo\").unwrap(); }" >> src/main.rs + cat src/main.rs + cargo build