Skip to content

To revert: Test if the new artifacts work #32

To revert: Test if the new artifacts work

To revert: Test if the new artifacts work #32

Workflow file for this run

name: Python-Wheels
on:
push:
branches: [ $default-branch, master, dev ]
permissions: write-all
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VTK_VERSION_MAJOR: 9
VTK_VERSION_MINOR: 2
VTK_VERSION_PATCH: 6
jobs:
build_wheels:
name: Build Python wheels x86_64
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Create setup.py
run: |
mv wrappers/python/wheels.github/* ./
python set_version.py
python set_eigen_data.py
rm set_version.py set_eigen_data.py
shell: bash
- name: download pre-built VTK static library (non-Linux)
uses: suisei-cn/[email protected]
with:
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{env.VTK_VERSION_MAJOR}}.${{env.VTK_VERSION_MINOR}}.${{env.VTK_VERSION_PATCH}}-static/vtk-${{runner.os}}-x86_64.tar.gz
target: ${{github.workspace}}/
if: runner.os != 'Linux'
- name: download pre-built VTK static library (Linux-x86_64)
uses: suisei-cn/[email protected]
with:
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{env.VTK_VERSION_MAJOR}}.${{env.VTK_VERSION_MINOR}}.${{env.VTK_VERSION_PATCH}}-static/vtk-manylinux2014_x86_64.tar.gz
target: ${{github.workspace}}/
if: runner.os == 'Linux'
- name: download pre-built VTK static library (Linux-i686)
uses: suisei-cn/[email protected]
with:
url: https://github.com/sanguinariojoe/vtk-builds/releases/download/VTK-${{env.VTK_VERSION_MAJOR}}.${{env.VTK_VERSION_MINOR}}.${{env.VTK_VERSION_PATCH}}-static/vtk-manylinux2014_i686.tar.gz
target: ${{github.workspace}}/
if: runner.os == 'Linux'
- name: Create folders
run: |
mkdir -p ${{github.workspace}}/vtk
if: runner.os != 'Linux'
- name: Extract VTK tgz
run: |
tar -xvzf vtk-${{runner.os}}-x86_64.tar.gz -C vtk/
if: runner.os != 'Linux'
- name: Build the source distribution
run: |
python -m pip install -U pip setuptools
python setup.py sdist
if: runner.os == 'Linux'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
if: runner.os == 'Linux'
- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: dist
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto
# Skip 32-bit wheels builds as well as musllinux
CIBW_SKIP: "*-win32 *musllinux*"
CIBW_BEFORE_ALL_LINUX: >
echo "Considering vtk-manylinux2014_`uname -m`.tar.gz..." &&
mkdir -p vtk &&
tar -xvzf vtk-manylinux2014_`uname -m`.tar.gz -C vtk/
- uses: actions/upload-artifact@v4
id: build_wheels
with:
name: python-wheels-${{runner.os}}
path: ./dist/*
build_aarch64:
name: Build Python wheels aarch64
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-manylinux-arch.yml@master
with:
arch: "aarch64"
secrets: inherit
build_ppc64le:
name: Build Python wheels ppc64le
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-manylinux-arch.yml@master
with:
arch: "ppc64le"
secrets: inherit
build_s390x:
name: Build Python wheels s390x
uses: FloatingArrayDesign/MoorDyn/.github/workflows/python-wheels-manylinux-arch.yml@master
with:
arch: "s390x"
secrets: inherit
publish:
runs-on: ${{ matrix.os }}
needs: [build_wheels, build_aarch64, build_ppc64le, build_s390x]
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Download Linux x86_64 dists
uses: actions/download-artifact@v4
with:
name: python-wheels-Linux
path: dist/
- name: Download MacOS x86_64 dists
uses: actions/download-artifact@v4
with:
name: python-wheels-MacOS
path: dist/
- name: Download Windows x86_64 dists
uses: actions/download-artifact@v4
with:
name: python-wheels-Windows
path: dist/
- name: Download Linux aarch64 dists
uses: actions/download-artifact@v4
with:
name: python-wheels-aarch64
path: dist/
- name: Download Linux ppc64le dists
uses: actions/download-artifact@v4
with:
name: python-wheels-ppc64le
path: dist/
- name: Download Linux s390x dists
uses: actions/download-artifact@v4
with:
name: python-wheels-s390x
path: dist/
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# # password: ${{ secrets.MOORDYN_TESTPYPI_API }}
# # repository-url: https://test.pypi.org/legacy/
# password: ${{ secrets.MOORDYN_PYPI_API }}
# repository-url: https://upload.pypi.org/legacy/
# skip-existing: true