mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
[wheel build] retire MacOS X86 and Python 3.6 builds
This commit is contained in:
parent
1f29380c42
commit
d9c7533d6c
73
.github/workflows/build-wheels.yml
vendored
73
.github/workflows/build-wheels.yml
vendored
@ -94,79 +94,6 @@ jobs:
|
|||||||
name: pytrexio-manylinux-${{ matrix.manylinux_tag }}
|
name: pytrexio-manylinux-${{ matrix.manylinux_tag }}
|
||||||
path: ./python/wheelhouse/*.whl
|
path: ./python/wheelhouse/*.whl
|
||||||
|
|
||||||
build_macos_wheels:
|
|
||||||
name: Build MacOS wheels for different versions of CPython
|
|
||||||
needs: get_commit_message
|
|
||||||
if: >-
|
|
||||||
contains(needs.get_commit_message.outputs.message, '[wheel build]') ||
|
|
||||||
(github.repository == 'TREX-CoE/trexio' && startsWith(github.ref, 'refs/tags/v'))
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [macos-12]
|
|
||||||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
|
|
||||||
- name: Display Python version
|
|
||||||
run: python --version
|
|
||||||
|
|
||||||
- name: Install HDF5
|
|
||||||
run: brew install hdf5@1.12
|
|
||||||
|
|
||||||
- name: Compute the PYTREXIO_VERSION environment variable
|
|
||||||
run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Print the PYTREXIO_VERSION
|
|
||||||
run: echo ${{ env.PYTREXIO_VERSION }}
|
|
||||||
|
|
||||||
- name: Download the Python API distribution tarball
|
|
||||||
uses: dawidd6/action-download-artifact@v2
|
|
||||||
with:
|
|
||||||
workflow: actions.yml
|
|
||||||
workflow_conclusion: success
|
|
||||||
name: pytrexio-source
|
|
||||||
path: python
|
|
||||||
|
|
||||||
- name: Extract the Python distribution
|
|
||||||
run: gzip -cd trexio-${{ env.PYTREXIO_VERSION }}.tar.gz | tar xvf -
|
|
||||||
working-directory: python
|
|
||||||
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: pip install --upgrade pip setuptools build delocate pytest
|
|
||||||
|
|
||||||
- name: Build wheel for a given version of CPython
|
|
||||||
run: |
|
|
||||||
mkdir wheelhouse/
|
|
||||||
cd trexio-${{ env.PYTREXIO_VERSION }}/
|
|
||||||
export H5_CFLAGS="-I$(brew --prefix hdf5)/include"
|
|
||||||
export H5_LDFLAGS="-L$(brew --prefix hdf5)/lib"
|
|
||||||
python -m build --wheel --outdir=./
|
|
||||||
delocate-wheel trexio-*.whl
|
|
||||||
mv trexio-*.whl ../wheelhouse/
|
|
||||||
working-directory: python
|
|
||||||
|
|
||||||
# Some issues with Python 3.10 wheels on MacOS-11
|
|
||||||
- name: Install the wheel
|
|
||||||
run: python -m pip install wheelhouse/trexio-*.whl
|
|
||||||
working-directory: python
|
|
||||||
|
|
||||||
- name: Test the wheel
|
|
||||||
run: pytest -v test_api.py
|
|
||||||
working-directory: python/test
|
|
||||||
|
|
||||||
- name: Upload produced wheels as artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: pytrexio-${{ matrix.os }}
|
|
||||||
path: ./python/wheelhouse/*.whl
|
|
||||||
|
|
||||||
|
|
||||||
publish_wheels:
|
publish_wheels:
|
||||||
name: Publish all wheels on PyPI
|
name: Publish all wheels on PyPI
|
||||||
|
@ -89,7 +89,7 @@ function build_wheel_for_py()
|
|||||||
|
|
||||||
# cleaning
|
# cleaning
|
||||||
rm -rf -- dist/ build/ trexio.egg-info/
|
rm -rf -- dist/ build/ trexio.egg-info/
|
||||||
rm -- test_file_py.h5 unsafe_test_file_py.h5
|
#rm -- test_file_py.h5 unsafe_test_file_py.h5
|
||||||
|
|
||||||
# deactivate the current environment
|
# deactivate the current environment
|
||||||
deactivate
|
deactivate
|
||||||
@ -103,7 +103,7 @@ function build_wheel_for_py()
|
|||||||
|
|
||||||
|
|
||||||
# build wheels for all versions of CPython in this container
|
# build wheels for all versions of CPython in this container
|
||||||
for CPYVERSION in 36 37 38 39 310
|
for CPYVERSION in 37 38 39 310
|
||||||
do
|
do
|
||||||
build_wheel_for_py ${CPYVERSION}
|
build_wheel_for_py ${CPYVERSION}
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user