Skip to content

Make importlib-resources version less strict (#9) #41

Make importlib-resources version less strict (#9)

Make importlib-resources version less strict (#9) #41

name: Publish 🦆duckdb_extension_inet 🐍📦 to PyPI
on: push
jobs:
build:
name: Build duckdb_extension_inet 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Act dependencies
if: ${{ env.ACT }}
run: |
apt-get update && apt-get install sudo -y
- name: Install uv
run: |
sudo apt update
sudo apt install -y curl unzip
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install python
run: uv venv
- name: build duckdb_extension_inet for osx_arm64
working-directory: ./extensions/duckdb_extension_inet
run: |
uv tool run hatch build -t wheel osx_arm64
- name: build duckdb_extension_inet for linux_amd64_gcc4
working-directory: ./extensions/duckdb_extension_inet
run: |
uv tool run hatch build -t wheel linux_amd64_gcc4
# - name: build duckdb_extension_inet for linux_arm64
# working-directory: ./extensions/duckdb_extension_inet
# run: |
# uv tool run hatch build -t wheel linux_arm64
- name: build duckdb_extension_inet for osx_amd64
working-directory: ./extensions/duckdb_extension_inet
run: |
uv tool run hatch build -t wheel osx_amd64
- name: build duckdb_extension_inet for windows_amd64
working-directory: ./extensions/duckdb_extension_inet
run: |
uv tool run hatch build -t wheel windows_amd64
- name: Copy wheels to dist directory
run: |
mkdir dist
cp extensions/*/*/*.whl dist
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: duckdb-extension-inet-distributions
path: dist/*.whl
test:
needs:
- build
strategy:
matrix:
os:
- ubuntu-latest
# - arm-ubuntu-22.04
- windows-latest
- macos-latest
- macos-13
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Act dependencies
if: ${{ env.ACT }}
run: |
apt-get update && apt-get install sudo -y
- name: Install curl
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y curl
- name: Install uv via curl
if: runner.os == 'Linux' || runner.os == 'macOS'
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install uv via powershell
if: runner.os == 'Windows'
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
- name: Install python
run: uv venv
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: duckdb-extension-inet-distributions
path: dist/
- name: Install packages
env:
EXTENSION_NAME: inet
run: |
uv sync --verbose
uv pip install pytest
uv pip install --no-index --find-links dist --verbose duckdb-extension-inet
uv run pytest
publish-to-pypi:
name: Publish 🦆duckdb_extension_inet 🐍📦 to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/duckdb-extension-inet
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: duckdb-extension-inet-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1