Skip to content

v1.9.0

v1.9.0 #82

Workflow file for this run

name: Deploy
on:
#push
# Runs when a (published) GitHub Release is created
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_BUILD_VERBOSITY: 1 #3
CIBW_SKIP: cp*-win32 *-musllinux_* *-manylinux_i686
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_ENVIRONMENT: >
LV_LIB_DIRS=/usr/local/lib64:/usr/lib64:${HOME}/lib
LV_INC_DIRS=${HOME}/include
LV_MIN_DEPS=1
LV_ECHO_FAIL=1
LV_ARGS="-v"
CIBW_BEFORE_BUILD_LINUX: >
rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux &&
dnf install -y libtiff-devel mesa-libOSMesa-devel && echo {package}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_TEST_COMMAND_MACOS: >
python -m pip install moderngl &&
export LV_CONTEXT=moderngl &&
git clone --depth 1 https://github.com/lavavu/Testing &&
cd Testing &&
python runall.py
#CIBW_TEST_COMMAND_LINUX: >
# export LV_CONTEXT=osmesa &&
# git clone --depth 1 https://github.com/lavavu/Testing &&
# cd Testing &&
# python runall.py
strategy:
matrix:
# MacOS 13 runner is x86_64, 14 is arm64
# (https://cibuildwheel.pypa.io/en/stable/faq/#how)
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.12'
- name: Install build
run: python -m pip install setuptools build
- name: Build sdist
run: python -m build . --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist-${{ strategy.job-index }}
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/lavavu
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Retrieve wheels
uses: actions/download-artifact@v4
with:
pattern: cibw-wheels*
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
#Uncomment to use testing repo
#with:
# repository-url: https://test.pypi.org/legacy/
test:
needs: [upload_pypi]
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, macos-14]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@master
with:
repository: LavaVu/Testing
path: Testing
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install wheel
run: python -m pip install --only-binary=lavavu lavavu
- name: Run tests
run: >
pip install moderngl &&
git clone --depth 1 https://github.com/lavavu/Testing &&
cd Testing &&
export LV_CONTEXT=moderngl &&
export LV_ECHO_FAIL=1 &&
export LV_ARGS="-v" &&
python runall.py