Skip to content

test101

test101 #168

Workflow file for this run

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) Contributors to the OpenEXR Project.
#
name: Python Wheels
on:
push:
branches-ignore:
- RB-2.*
tags-ignore:
- v1.*
- v2.*
paths:
- '**'
- '!**.md'
- '!website/**'
- 'website/src/**'
- '!bazel/**'
pull_request:
branches-ignore:
- RB-2.*
tags-ignore:
- v1.*
- v2.*
paths:
- '**'
- '!**.md'
- '!website/**'
- 'website/src/**'
- '!bazel/**'
permissions:
contents: read
jobs:
build_wheels:
name: Build Python wheels
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macOS-latest]
env:
# On macOS we build both x86 and arm to support Intel and Apple Silicon.
CIBW_ARCHS_MACOS: x86_64 arm64
# Skip 32-bit wheels builds on Windows.
# Also skip the PyPy builds, since they fail the unittests
CIBW_SKIP: "*-win32 *_i686 pp*"
# The CI platform is Intel based so we are doing cross compilation
# for arm64. It is not currently possible to test arm64 when cross
# compiling.
CIBW_TEST_SKIP: "*_arm64"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest {project}/src/wrappers/python/tests/
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create build directories
run: |
mkdir _build
mkdir _install
- name: Configure OpenEXR libraries
run: |
cmake .. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_VERBOSE_MAKEFILE:BOOL='ON' \
-DBUILD_TESTING='OFF' \
-DOPENEXR_BUILD_TOOLS='OFF' \
-DOPENEXR_INSTALL_TOOLS='OFF' \
-DOPENEXR_INSTALL_DOCS='OFF' \
-DOPENEXR_INSTALL_EXAMPLES='OFF'
working-directory: _build
- name: Build & install OpenEXR libraries
run: |
cmake --build . \
--target install
working-directory: _build
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: |
echo ${{github.workspace}}/_install > cmake_prefix_path
python -m cibuildwheel --output-dir wheelhouse
working-directory: src/wrappers/python
- uses: actions/upload-artifact@v3
with:
name: "Python wheels"
path: ./wheelhouse/*.whl