Skip to content

Fix missing Column name (#63) #200

Fix missing Column name (#63)

Fix missing Column name (#63) #200

Workflow file for this run

name: Python pgpq CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PACKAGE_NAME: pgpq
PYTHON_VERSION: "3.11" # to build abi3 wheels
MATURIN_VERSION: "v1.7.4"
PACKAGE_DIR: py
UV_SYSTEM_PYTHON: 1
jobs:
macos:
name: Build / MacOS
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ env.PACKAGE_DIR }}
- name: Build wheels - x86_64
uses: messense/maturin-action@v1
with:
target: x86_64
args: -m ${{ env.PACKAGE_DIR }}/Cargo.toml --release --out dist --sdist
maturin-version: ${{ env.MATURIN_VERSION }}
- name: Install built wheel - x86_64
run: |
uv pip install "$(find dist -name '*.whl' -type f | head -n 1)" --force-reinstall --no-deps
- name: Build wheels - universal2
uses: messense/maturin-action@v1
with:
args: -m ${{ env.PACKAGE_DIR }}/Cargo.toml --release --out dist
maturin-version: ${{ env.MATURIN_VERSION }}
target: universal2-apple-darwin
- name: Install built wheel - universal2
run: |
uv pip install "$(find dist -name '*_universal2.whl' -type f | head -n 1)" --force-reinstall --no-deps
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-macos
path: dist
windows:
name: Build / Windows (${{ matrix.target }})
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: windows-latest
timeout-minutes: 30
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.target }}
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-host x86_64-pc-windows-msvc
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
shell: bash
- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ env.PACKAGE_DIR }}
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: -m ${{ env.PACKAGE_DIR }}/Cargo.toml --release --out dist
maturin-version: ${{ env.MATURIN_VERSION }}
- name: Install built wheel
shell: bash
run: |
uv pip install "$(find dist -name '*.whl' -type f | head -n 1)" --force-reinstall --no-deps
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-windows-${{ matrix.target }}
path: dist
linux:
name: Build & Test / Linux (${{ matrix.target }})
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
target: [x86_64, i686]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ env.PACKAGE_DIR }}
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: -m ${{ env.PACKAGE_DIR }}/Cargo.toml --release --out dist
maturin-version: ${{ env.MATURIN_VERSION }}
- name: Install built wheel and test
if: matrix.target == 'x86_64'
run: |
uv pip install "$(find dist -name '*.whl' -type f | head -n 1)[test]" --force-reinstall
uv pip freeze
uv run pytest -v ${{ env.PACKAGE_DIR }}
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-linux-${{ matrix.target }}
path: dist
musllinux:
name: Build / MuslLinux (${{ matrix.target }})
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- i686-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Build wheels
uses: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: -m ${{ env.PACKAGE_DIR }}/Cargo.toml --release --out dist
maturin-version: ${{ env.MATURIN_VERSION }}
- name: Install built wheel
if: matrix.target == 'x86_64-unknown-linux-musl'
uses: addnab/docker-run-action@v3
with:
image: alpine:latest
options: -v ${{ github.workspace }}:/io -w /io
run: |
apk add python3 curl
curl -LsSf https://astral.sh/uv/install.sh | sh
. $HOME/.local/bin/env
uv venv
. .venv/bin/activate
uv pip install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall --no-deps
- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-musllinux-${{ matrix.target }}
path: dist
lint:
name: Lint (${{ matrix.python }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
# Lint on earliest and latest
python: ["3.8", "3.x"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ env.PACKAGE_DIR }}
- name: Lint
run: |
make lint
# https://github.com/marketplace/actions/alls-green
alls-green:
name: "Check release process - pgpq"
if: always()
needs:
- lint
- linux
- macos
- windows
- musllinux
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
# These get skipped in PRs and only run on main
# If they get skipped in a PR, we still want to consider them "green"
# If they fail in main, we want to fail the alls-green check
allowed-skips: macos,windows, musllinux
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
needs:
- lint
- linux
- macos
- windows
- musllinux
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
uvx twine upload --skip-existing *