abce868dbb
Switch source build to 3.14 (not t)
279 lines
7.1 KiB
YAML
279 lines
7.1 KiB
YAML
name: Python
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
manylinux:
|
|
name: py${{ matrix.py }} ${{ matrix.ml }}
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# see compat matrix: https://github.com/pypa/manylinux
|
|
|
|
- ml: manylinux1_x86_64
|
|
py: cp27-cp27m
|
|
cy: "Cython<3.0"
|
|
skip: true
|
|
|
|
- ml: manylinux2010_x86_64
|
|
py: cp37-cp37m
|
|
skip: true
|
|
|
|
- ml: manylinux2010_x86_64
|
|
py: cp38-cp38
|
|
skip: true
|
|
|
|
- ml: manylinux2014_x86_64
|
|
py: cp39-cp39
|
|
|
|
- ml: manylinux2014_x86_64
|
|
py: cp310-cp310
|
|
|
|
- ml: manylinux2014_x86_64
|
|
py: cp311-cp311
|
|
|
|
- ml: manylinux2014_x86_64
|
|
py: cp312-cp312
|
|
|
|
- ml: manylinux2014_x86_64
|
|
py: cp313-cp313
|
|
|
|
- ml: manylinux_2_28_x86_64
|
|
py: cp314-cp314
|
|
src: true
|
|
|
|
- ml: manylinux_2_28_x86_64
|
|
py: cp314-cp314t
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Automatic core dumper analysis
|
|
uses: mdavidsaver/ci-core-dumper@master
|
|
|
|
- name: Detect pre-release
|
|
run: python ./gha-set-pre.py
|
|
|
|
- name: Build
|
|
run: |
|
|
# emit script to be executed in container.
|
|
cat <<EOF > runit.sh
|
|
#!/bin/sh
|
|
set -e -x
|
|
ls /opt/python/
|
|
/opt/python/${{ matrix.py }}/bin/python --version
|
|
|
|
yum -y install gdb || dnf -y install gdb || (apt update && apt -y install gdb)
|
|
|
|
export PATH="/opt/python/${{ matrix.py }}/bin:\$PATH"
|
|
export SETUPTOOLS_DSO_PLAT_NAME="${{ matrix.ml }}"
|
|
|
|
cd /io
|
|
|
|
pip install -U pip
|
|
# pre-download for later steps
|
|
pip download $PRE -d output \
|
|
--only-binary numpy,Cython \
|
|
--only-binary epicscorelibs \
|
|
"${{ matrix.cy || 'Cython' }}" \
|
|
setuptools_dso epicscorelibs wheel numpy ply nose2
|
|
|
|
# create source tar
|
|
pip install $PRE --no-index -f ./output setuptools_dso epicscorelibs
|
|
python setup.py sdist -d ./output
|
|
ls -lh output
|
|
|
|
# build wheel from source tar
|
|
pip wheel $PRE -w ./output --no-index -f ./output pvxslibs
|
|
ls -lh output
|
|
|
|
# install wheel for testing
|
|
pip install $PRE --no-index -f ./output pvxslibs nose2
|
|
|
|
# switch away from root when running test to avoid inclusion in PYTHONPATH
|
|
cd output
|
|
python -m nose2 -v pvxslibs
|
|
|
|
EOF
|
|
# end of script. Now execute in container
|
|
|
|
chmod +x runit.sh
|
|
mkdir output
|
|
podman run --rm \
|
|
-v `pwd`:/io \
|
|
quay.io/pypa/${{ matrix.ml }} \
|
|
/io/runit.sh
|
|
|
|
- name: Result
|
|
run: ls -lhtr output
|
|
|
|
- name: Save wheels
|
|
if: ${{ ! matrix.skip }}
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
retention-days: 1
|
|
name: whl-${{ matrix.py }}-${{ matrix.ml }}
|
|
path: output/pvxslibs*.whl
|
|
|
|
- name: Save source
|
|
if: ${{ matrix.src }}
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
retention-days: 1
|
|
name: whl-source
|
|
path: output/pvxslibs*.gz
|
|
|
|
native:
|
|
name: py${{ matrix.py }} ${{ matrix.arch }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
py: "3.8"
|
|
arch: win_amd64
|
|
|
|
# windows + 3.9 omitted due to numpy bug "invalid preprocessor command 'warning'"
|
|
|
|
- os: windows-latest
|
|
py: "3.10"
|
|
arch: win_amd64
|
|
|
|
- os: windows-latest
|
|
py: "3.11"
|
|
arch: win_amd64
|
|
|
|
- os: windows-latest
|
|
py: "3.12"
|
|
arch: win_amd64
|
|
|
|
- os: windows-latest
|
|
py: "3.13"
|
|
arch: win_amd64
|
|
|
|
- os: windows-latest
|
|
py: "3.14"
|
|
arch: win_amd64
|
|
|
|
- os: macos-latest
|
|
py: "3.8"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.9"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.10"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.11"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.12"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.13"
|
|
arch: macosx_11_0_universal2
|
|
|
|
- os: macos-latest
|
|
py: "3.14"
|
|
arch: macosx_11_0_universal2
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.py }}
|
|
|
|
- name: Prepare
|
|
run: python -m pip install -U pip virtualenv
|
|
|
|
- name: PIP Debug
|
|
run: pip debug -v
|
|
|
|
- name: Detect pre-release
|
|
run: python ./gha-set-pre.py
|
|
|
|
- name: Build
|
|
run: |
|
|
set -x -e
|
|
python -m pip install -U pip
|
|
pip download $PRE -d output \
|
|
--only-binary numpy,Cython \
|
|
--only-binary epicscorelibs \
|
|
Cython setuptools_dso epicscorelibs wheel numpy ply nose2
|
|
|
|
export SETUPTOOLS_DSO_PLAT_NAME=${{ matrix.arch }}
|
|
|
|
pip install $PRE --no-index -f ./output setuptools_dso epicscorelibs
|
|
python setup.py sdist -d ./output
|
|
ls -lh output
|
|
|
|
# build wheel from source tar
|
|
pip wheel $PRE -w ./output --no-index -f ./output pvxslibs
|
|
ls -lh output
|
|
|
|
# install wheel for testing
|
|
pip install $PRE --no-index -f ./output pvxslibs nose2
|
|
|
|
# switch away from root when running test to avoid inclusion in PYTHONPATH
|
|
cd output
|
|
python -m nose2 -v pvxslibs
|
|
|
|
- run: ls -lhtr output
|
|
|
|
- name: Save wheels
|
|
if: ${{ ! matrix.skip }}
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
retention-days: 1
|
|
name: whl-${{ matrix.py }}-${{ matrix.os }}
|
|
path: output/pvxslibs*.whl
|
|
|
|
combine:
|
|
runs-on: ubuntu-latest
|
|
needs: [manylinux, native]
|
|
steps:
|
|
- name: Download
|
|
uses: actions/download-artifact@v7
|
|
with:
|
|
merge-multiple: true
|
|
|
|
- run: ls -lhtr
|
|
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Setup
|
|
run: |
|
|
pip install -U pip twine
|
|
python -m twine -h
|
|
|
|
- name: Check
|
|
run: twine check pvxslibs*.gz pvxslibs*.whl
|
|
|
|
- name: Upload wheels
|
|
if: env.TWINE_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master'
|
|
env:
|
|
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
run: twine upload --skip-existing pvxslibs*.gz pvxslibs*.whl
|