1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 12:23:54 +01:00

[wheel build] publish the Python API 1.1.0 on PyPI

This commit is contained in:
q-posev 2022-01-07 19:40:52 +01:00
parent dcb976010f
commit edcaf537bd

View File

@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
manylinux_tag: [2010_x86_64, 2014_x86_64, 2_24_x86_64]
steps:
- name: Checkout the branch
uses: actions/checkout@v2
@ -55,10 +55,10 @@ jobs:
- name: Install build dependencies
run: python -m pip install -U setuptools
- 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 }}
@ -72,7 +72,7 @@ jobs:
workflow_conclusion: success
name: pytrexio-source
path: python
# at the moment we have to pull the custom container with pre-installed HDF5
# the containers are built and stored in GitHub container registry ghcr.io/q-posev
- name: Pull the manylinux Docker container with HDF5
@ -80,11 +80,11 @@ jobs:
- name: Build wheels for different versions of CPython inside the Docker container
run: >
docker run --rm
--env PLAT=manylinux${{ matrix.manylinux_tag }}
--volume `pwd`:/tmp
--workdir /tmp
ghcr.io/q-posev/hdf5_1_12_on_${{ matrix.manylinux_tag }}
docker run --rm
--env PLAT=manylinux${{ matrix.manylinux_tag }}
--volume `pwd`:/tmp
--workdir /tmp
ghcr.io/q-posev/hdf5_1_12_on_${{ matrix.manylinux_tag }}
/bin/bash build_manylinux_wheels.sh trexio-${{ env.PYTREXIO_VERSION }}.tar.gz
working-directory: python
@ -132,10 +132,10 @@ jobs:
#- name: Set MACOSX_DEPLOYMENT_TARGET environment variable
# if: ${{ matrix.os == 'macos-11' }}
# run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
- 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 }}
@ -146,14 +146,14 @@ jobs:
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
- name: Build wheel for a given version of CPython
run: |
mkdir wheelhouse/
@ -162,16 +162,16 @@ jobs:
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: python test_api.py
working-directory: python/test
- name: Upload produced wheels as artifacts
uses: actions/upload-artifact@v2
with:
@ -226,10 +226,9 @@ jobs:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
#verbose: true
# Only upload to PyPI if the commit was tagged !
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
#if: startsWith(github.ref, 'refs/tags')