psql ODBC Linux CI - Use signed type for error status (#193) * Use signed type for error status * Update Win32/Win64 OpenSSL to 3.5.7 slproweb.com no longer hosts the 3.5.6 installer (returns 404), which broke the Windows CI download step. Bump to 3.5.7, which is available. * Add Visual Studio 2026 (v18.0 / v145 toolset) support to Windows build The GitHub Actions windows runner image rolled to Visual Studio 18.0 (VS 2026, MSVC 14.51). The build scripts' hardcoded version switches only recognized up... #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Linux Build | |
| run-name: psql ODBC Linux CI - ${{ github.event.head_commit.message }} | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| name: Debian (Ubuntu) | |
| - os: ubuntu-latest | |
| name: Red Hat (Fedora) | |
| container: fedora:latest | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| container: ${{ matrix.container || '' }} | |
| steps: | |
| - name: Install dependencies (Debian) | |
| if: matrix.container == '' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential autoconf automake libtool \ | |
| libpq-dev unixodbc-dev unixodbc \ | |
| postgresql postgresql-client | |
| if ! command -v odbc_config >/dev/null 2>&1; then | |
| sudo tee /usr/local/bin/odbc_config > /dev/null <<'EOF' | |
| #!/bin/sh | |
| case $1 in | |
| --include-prefix) echo "/usr/include" ;; | |
| --lib-prefix) echo "/usr/lib" ;; | |
| --libs) echo "-lodbc" ;; | |
| *) echo "$0: unknown argument '$1'"; exit 1 ;; | |
| esac | |
| EOF | |
| sudo chmod +x /usr/local/bin/odbc_config | |
| fi | |
| - name: Install dependencies (Fedora) | |
| if: matrix.container == 'fedora:latest' | |
| run: | | |
| dnf install -y \ | |
| gcc make autoconf automake libtool \ | |
| libpq-devel unixODBC-devel postgresql-server postgresql \ | |
| diffutils git | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bootstrap | |
| run: autoreconf -fi | |
| - name: Configure | |
| run: | | |
| PG_CONFIG=$(find /usr -name pg_config -type f 2>/dev/null | head -1) | |
| if [ -n "$PG_CONFIG" ]; then | |
| export PATH="$(dirname $PG_CONFIG):$PATH" | |
| fi | |
| ./configure | |
| - name: Build | |
| run: make -j$(nproc) | |
| - name: Start PostgreSQL (Debian) | |
| if: matrix.container == '' | |
| run: | | |
| sudo mkdir -p /var/run/postgresql | |
| sudo chown postgres:postgres /var/run/postgresql | |
| sudo pg_ctlcluster $(pg_lsclusters -h | head -1 | awk '{print $1, $2}') start | |
| sudo -u postgres createuser -s runner | |
| sudo -u postgres createdb contrib_regression | |
| - name: Start PostgreSQL (Fedora) | |
| if: matrix.container == 'fedora:latest' | |
| run: | | |
| mkdir -p /var/lib/pgsql/data /var/run/postgresql | |
| chown postgres:postgres /var/lib/pgsql/data /var/run/postgresql | |
| su postgres -c 'initdb -D /var/lib/pgsql/data' || { echo "initdb failed"; exit 1; } | |
| su postgres -c "sed -i 's/^logging_collector = on/logging_collector = off/' /var/lib/pgsql/data/postgresql.conf" | |
| su postgres -c 'pg_ctl -D /var/lib/pgsql/data -l /tmp/pg.log -t 30 start' || { cat /tmp/pg.log; exit 1; } | |
| su postgres -c 'createuser -s root' | |
| createdb contrib_regression | |
| - name: Test | |
| run: | | |
| cd test | |
| make installcheck |