Skip to content

DM-45939: Use std namespace for cstdint types #590

DM-45939: Use std namespace for cstdint types

DM-45939: Use std namespace for cstdint types #590

Workflow file for this run

name: build_and_test
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
build_and_test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
# Need to clone everything to determine version from git.
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "setup.cfg"
allow-prereleases: true
- name: Build and install
run: |
python -m pip install --upgrade pip setuptools uv
uv pip install --system .[yaml,test]
- name: Run tests
run: pytest -r a -v
pypi_sdist_build:
runs-on: ubuntu-latest
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "setup.cfg"
- name: Install dependencies
run: |
pip install --upgrade setuptools wheel build
- name: Build and create distribution
run: |
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: sphgeom-sdist
path: dist/*
pypi_wheel_build:
strategy:
matrix:
os: ["ubuntu-latest", "macos-12"]
runs-on: ${{ matrix.os }}
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')
env:
CIBW_BUILD: "cp3{8,9,10,11,12,13}-{manylinux_x86_64,manylinux_aarch64,macosx_arm64,macosx_x86_64}"
CIBW_ARCHS_MACOS: "x86_64 arm64"
# use line below to enable aarch64 builds
# CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_LINUX: "auto"
steps:
# uncomment when building aarch64
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# if: runner.os == 'Linux'
# with:
# platforms: arm64
- uses: actions/checkout@v4
with:
# Need to clone everything to embed the versiona
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install --upgrade setuptools wheel cibuildwheel
- name: Build and create distribution
run: |
python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v4
with:
name: sphgeom-${{ matrix.os }}
path: dist/*
pipy_upload:
needs: [pypi_sdist_build, pypi_wheel_build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: sphgeom-*
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOADS }}