Deploy #64
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 3 | ||
CIBW_SKIP: cp*-win32 *-musllinux_* *-manylinux_i686 | ||
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* | ||
#CIBW_TEST_COMMAND: python3 -m doctest -v lavavu/lavavu.py | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel} | ||
CIBW_BEFORE_BUILD_LINUX: dnf config-manager --set-enabled powertools && dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y && dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y && dnf install -y ffmpeg libtiff-devel | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
- name: Setup ffmpeg (macOS only) | ||
if: runner.os == 'macOS' | ||
run: brew install ffmpeg@4 | ||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install cibuildwheel==2.16.2 | ||
- name: Build wheels | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
name: Install Python | ||
with: | ||
python-version: '3.8' | ||
- name: Build sdist | ||
run: python setup.py sdist | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: dist/*.tar.gz | ||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
name: Upload release to PyPI | ||
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@v2 | ||
with: | ||
name: artifact | ||
path: dist | ||
- 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] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
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 headless test (linux only) | ||
#env: | ||
# LV_ECHO_FAIL: "1" | ||
# LV_ARGS: "-v" | ||
#This needs to run with xvfb | ||
#uses: GabrielBB/xvfb-action@v1 | ||
#if: runner.os == 'Linux' | ||
#with: | ||
# working-directory: ./Testing | ||
# run: python runall.py | ||