Update "CMakeLists.txt" file. #2
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
# SPDX-License-Identifier: BSD-3-Clause | |
# Copyright Contributors to the OpenColorIO Project. | |
# | |
name: Wheel | |
on: | |
push: | |
# Workflow run on tags for v2 only. | |
tags: | |
- v2.* | |
pull_request: | |
# Workflow run on pull_request only when related files change. | |
branches-ignore: | |
- RB-0.* | |
- RB-1.* | |
- gh-pages | |
tags-ignore: | |
- v0.* | |
- v1.* | |
paths: | |
- .github/workflows/wheel_workflow.yml | |
- MANIFEST.in | |
- pyproject.toml | |
- setup.cfg | |
- setup.py | |
jobs: | |
# Linux jobs run in Docker containers (manylinux), so the latest OS version | |
# is OK. macOS and Windows jobs need to be locked to specific virtual | |
# environment versions to mitigate issues from OS updates, and will require | |
# maintenance as OS versions are retired. | |
# | |
# Due to documentation build failing on manylinux2010 (maybe too old doxygen | |
# version), we build on manylinux2014 image, this requires pip >= 19.3. | |
# --------------------------------------------------------------------------- | |
# Source Distribution | |
# --------------------------------------------------------------------------- | |
sdist: | |
name: Build SDist | |
runs-on: ubuntu-latest | |
# Don't run on OCIO forks | |
if: | | |
github.event_name != 'schedule' || | |
github.repository == 'AcademySoftwareFoundation/OpenColorIO' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build SDist | |
run: pipx run build --sdist | |
- name: Check metadata | |
run: pipx run twine check dist/* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
# --------------------------------------------------------------------------- | |
# Linux Wheels | |
# --------------------------------------------------------------------------- | |
linux: | |
name: Build wheels on Linux | |
runs-on: ubuntu-latest | |
# Don't run on OCIO forks | |
# if: | | |
# github.event_name != 'schedule' || | |
# github.repository == 'AcademySoftwareFoundation/OpenColorIO' | |
strategy: | |
matrix: | |
include: | |
# ------------------------------------------------------------------- | |
# CPython 64 bits | |
# ------------------------------------------------------------------- | |
- build: CPython 3.7 64 bits | |
python: cp37-manylinux* | |
arch: x86_64 | |
- build: CPython 3.8 64 bits | |
python: cp38-manylinux* | |
arch: x86_64 | |
- build: CPython 3.9 64 bits | |
python: cp39-manylinux* | |
arch: x86_64 | |
- build: CPython 3.10 64 bits | |
python: cp310-manylinux* | |
arch: x86_64 | |
- build: CPython 3.11 64 bits | |
python: cp311-manylinux* | |
arch: x86_64 | |
# ------------------------------------------------------------------- | |
# CPython ARM 64 bits | |
# ------------------------------------------------------------------- | |
- build: CPython 3.7 ARM 64 bits | |
python: cp37-manylinux* | |
arch: aarch64 | |
- build: CPython 3.8 ARM 64 bits | |
python: cp38-manylinux* | |
arch: aarch64 | |
- build: CPython 3.9 ARM 64 bits | |
python: cp39-manylinux* | |
arch: aarch64 | |
- build: CPython 3.10 ARM 64 bits | |
python: cp310-manylinux* | |
arch: aarch64 | |
- build: CPython 3.11 ARM 64 bits | |
python: cp311-manylinux* | |
arch: aarch64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.12.0 | |
env: | |
CIBW_BUILD: ${{ matrix.python }} | |
CIBW_ARCHS: ${{ matrix.arch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
# --------------------------------------------------------------------------- | |
# macOS Wheels | |
# --------------------------------------------------------------------------- | |
macos: | |
name: Build wheels on macOS | |
runs-on: macos-11 | |
# Don't run on OCIO forks | |
if: | | |
github.event_name != 'schedule' || | |
github.repository == 'AcademySoftwareFoundation/OpenColorIO' | |
strategy: | |
matrix: | |
include: | |
# ------------------------------------------------------------------- | |
# CPython 64 bits | |
# ------------------------------------------------------------------- | |
- build: CPython 3.7 64 bits | |
python: cp37-* | |
arch: x86_64 | |
- build: CPython 3.8 64 bits | |
python: cp38-* | |
arch: x86_64 | |
- build: CPython 3.9 64 bits | |
python: cp39-* | |
arch: x86_64 | |
- build: CPython 3.10 64 bits | |
python: cp310-* | |
arch: x86_64 | |
- build: CPython 3.11 64 bits | |
python: cp311-* | |
arch: x86_64 | |
# ------------------------------------------------------------------- | |
# CPython ARM 64 bits | |
# ------------------------------------------------------------------- | |
- build: CPython 3.8 ARM 64 bits | |
python: cp38-* | |
arch: arm64 | |
- build: CPython 3.9 ARM 64 bits | |
python: cp39-* | |
arch: arm64 | |
- build: CPython 3.10 ARM 64 bits | |
python: cp310-* | |
arch: arm64 | |
- build: CPython 3.11 ARM 64 bits | |
python: cp311-* | |
arch: arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.12.0 | |
env: | |
CIBW_BUILD: ${{ matrix.python }} | |
CIBW_ARCHS: ${{ matrix.arch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
# --------------------------------------------------------------------------- | |
# Windows Wheels | |
# --------------------------------------------------------------------------- | |
windows: | |
name: Build wheels on Windows | |
runs-on: windows-2019 | |
# Don't run on OCIO forks | |
if: | | |
github.event_name != 'schedule' || | |
github.repository == 'AcademySoftwareFoundation/OpenColorIO' | |
strategy: | |
matrix: | |
include: | |
# ------------------------------------------------------------------- | |
# CPython 64 bits | |
# ------------------------------------------------------------------- | |
- build: CPython 3.7 64 bits | |
python: cp37-* | |
arch: AMD64 | |
- build: CPython 3.8 64 bits | |
python: cp38-* | |
arch: AMD64 | |
- build: CPython 3.9 64 bits | |
python: cp39-* | |
arch: AMD64 | |
- build: CPython 3.10 64 bits | |
python: cp310-* | |
arch: AMD64 | |
- build: CPython 3.11 64 bits | |
python: cp311-* | |
arch: AMD64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.8' | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.12.0 | |
env: | |
CIBW_BUILD: ${{ matrix.python }} | |
CIBW_ARCHS: ${{ matrix.arch }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
upload_pypi: | |
needs: [sdist, linux, macos, windows] | |
runs-on: ubuntu-latest | |
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/setup-python@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ |