-
Notifications
You must be signed in to change notification settings - Fork 632
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Let's see if the wheels are building
Signed-off-by: Jose Luis Cercos-Pita <[email protected]>
- Loading branch information
1 parent
4d683ec
commit b110f56
Showing
6 changed files
with
1,785 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: Python wheels | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch, main ] | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build Python wheels | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, windows-latest, macOS-latest] | ||
env: | ||
# Skip 32-bit wheels builds | ||
CIBW_SKIP: "*-win32 *_i686" | ||
CIBW_BEFORE_BUILD_LINUX: > | ||
echo "Installing Zlib..." && | ||
cd zlib.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib ../zlib && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing Imath-3.1.8..." && | ||
cd imath.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../imath && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing OpenEXR..." && | ||
cd openexr.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../ && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. | ||
CIBW_BEFORE_BUILD_WINDOWS: > | ||
echo "Installing Zlib..." && | ||
cd zlib.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib ../zlib && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing Imath-3.1.8..." && | ||
cd imath.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../imath && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing OpenEXR..." && | ||
cd openexr.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../ && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. | ||
CIBW_BEFORE_BUILD_MACOS: > | ||
echo "Installing Zlib..." && | ||
cd zlib.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib ../zlib && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing Imath-3.1.8..." && | ||
cd imath.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../imath && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. && | ||
echo "Installing OpenEXR..." && | ||
cd openexr.build && | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../openexr.install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_PREFIX_PATH=../openexr.install -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF ../ && | ||
cmake --build ./ --config Release --clean-first && | ||
cmake --install ./ --config Release && | ||
cd .. | ||
CIBW_TEST_COMMAND: pytest ./src/wrappers/python/tests/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.8.1 | ||
|
||
- name: Create setup.py | ||
run: | | ||
rm -f ${{github.workspace}}/setup.py | ||
mv ${{github.workspace}}/.github.setup.py ${{github.workspace}}/setup.py | ||
- name: Create folders | ||
run: | | ||
mkdir -p ${{github.workspace}}/zlib.build | ||
mkdir -p ${{github.workspace}}/imath.build | ||
mkdir -p ${{github.workspace}}/openexr.build | ||
mkdir -p ${{github.workspace}}/openexr.install | ||
- name: download Zlib source code | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz | ||
target: ${{github.workspace}}/ | ||
|
||
- name: Extract Zlib | ||
run: | | ||
tar -xvzf zlib-1.2.13.tar.gz -C ${{github.workspace}}/ | ||
mv zlib-1.2.13 zlib | ||
rm zlib-1.2.13.tar.gz | ||
- name: download Imath source code | ||
uses: suisei-cn/[email protected] | ||
with: | ||
url: https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/v3.1.8.tar.gz | ||
target: ${{github.workspace}}/ | ||
|
||
- name: Extract Imath | ||
run: | | ||
tar -xvzf v3.1.8.tar.gz -C ${{github.workspace}}/ | ||
mv Imath-3.1.8 imath | ||
rm v3.1.8.tar.gz | ||
- name: Build wheels | ||
run: python -m cibuildwheel --output-dir wheelhouse | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: "Python wheels" | ||
path: ./wheelhouse/*.whl |
Oops, something went wrong.