v1.8.83 #76
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: OSMesa | |
on: | |
workflow_dispatch: | |
#push | |
# Runs when a (published) GitHub Release is created | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build lavavu-osmesa wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CIBW_BUILD_VERBOSITY: 3 | |
CIBW_SKIP: cp*-win32 *-musllinux_* *-manylinux_i686 | |
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-* | |
CIBW_ENVIRONMENT: LV_PACKAGE=lavavu-osmesa LV_OSMESA=1 LV_LIB_DIRS=/usr/local/lib64:/usr/lib64:${HOME}/lib LV_INC_DIRS=${HOME}/include | |
CIBW_BEFORE_BUILD_LINUX: cd ~ && curl -O -L https://github.com/lavavu/LavaVu/releases/latest/download/ffmpeg-mini.zip && unzip -o ffmpeg-mini.zip && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux && dnf install -y libtiff-devel mesa-libOSMesa-devel && echo {package} && sed -i 's/name = "lavavu"/name = "lavavu-osmesa"/g' {package}/pyproject.toml | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.21.2 | |
- 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 | |
upload_pypi: | |
needs: [build_wheels] | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/lavavu-osmesa | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
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/ | |
deploy_docker: | |
needs: [upload_pypi] #Requires lavavu-osmesa package to be uploaded | |
name: Build and push Docker image to GitHub Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/lavavu/lavavu | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push to GitHub Packages | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/lavavu/lavavu:latest | |
${{ steps.meta.outputs.tags }} | |