mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-12-22 20:35:44 +01:00
[wheel build] publish the Python API 1.1.0 on PyPI
This commit is contained in:
parent
dcb976010f
commit
edcaf537bd
39
.github/workflows/build-wheels.yml
vendored
39
.github/workflows/build-wheels.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
manylinux_tag: [2010_x86_64, 2014_x86_64, 2_24_x86_64]
|
manylinux_tag: [2010_x86_64, 2014_x86_64, 2_24_x86_64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the branch
|
- name: Checkout the branch
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -55,10 +55,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: python -m pip install -U setuptools
|
run: python -m pip install -U setuptools
|
||||||
|
|
||||||
- name: Compute the PYTREXIO_VERSION environment variable
|
- name: Compute the PYTREXIO_VERSION environment variable
|
||||||
run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV
|
run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Print the PYTREXIO_VERSION
|
- name: Print the PYTREXIO_VERSION
|
||||||
run: echo ${{ env.PYTREXIO_VERSION }}
|
run: echo ${{ env.PYTREXIO_VERSION }}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ jobs:
|
|||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
name: pytrexio-source
|
name: pytrexio-source
|
||||||
path: python
|
path: python
|
||||||
|
|
||||||
# at the moment we have to pull the custom container with pre-installed HDF5
|
# 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
|
# the containers are built and stored in GitHub container registry ghcr.io/q-posev
|
||||||
- name: Pull the manylinux Docker container with HDF5
|
- 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
|
- name: Build wheels for different versions of CPython inside the Docker container
|
||||||
run: >
|
run: >
|
||||||
docker run --rm
|
docker run --rm
|
||||||
--env PLAT=manylinux${{ matrix.manylinux_tag }}
|
--env PLAT=manylinux${{ matrix.manylinux_tag }}
|
||||||
--volume `pwd`:/tmp
|
--volume `pwd`:/tmp
|
||||||
--workdir /tmp
|
--workdir /tmp
|
||||||
ghcr.io/q-posev/hdf5_1_12_on_${{ matrix.manylinux_tag }}
|
ghcr.io/q-posev/hdf5_1_12_on_${{ matrix.manylinux_tag }}
|
||||||
/bin/bash build_manylinux_wheels.sh trexio-${{ env.PYTREXIO_VERSION }}.tar.gz
|
/bin/bash build_manylinux_wheels.sh trexio-${{ env.PYTREXIO_VERSION }}.tar.gz
|
||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
@ -132,10 +132,10 @@ jobs:
|
|||||||
#- name: Set MACOSX_DEPLOYMENT_TARGET environment variable
|
#- name: Set MACOSX_DEPLOYMENT_TARGET environment variable
|
||||||
# if: ${{ matrix.os == 'macos-11' }}
|
# if: ${{ matrix.os == 'macos-11' }}
|
||||||
# run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
|
# run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Compute the PYTREXIO_VERSION environment variable
|
- name: Compute the PYTREXIO_VERSION environment variable
|
||||||
run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV
|
run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Print the PYTREXIO_VERSION
|
- name: Print the PYTREXIO_VERSION
|
||||||
run: echo ${{ env.PYTREXIO_VERSION }}
|
run: echo ${{ env.PYTREXIO_VERSION }}
|
||||||
|
|
||||||
@ -146,14 +146,14 @@ jobs:
|
|||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
name: pytrexio-source
|
name: pytrexio-source
|
||||||
path: python
|
path: python
|
||||||
|
|
||||||
- name: Extract the Python distribution
|
- name: Extract the Python distribution
|
||||||
run: gzip -cd trexio-${{ env.PYTREXIO_VERSION }}.tar.gz | tar xvf -
|
run: gzip -cd trexio-${{ env.PYTREXIO_VERSION }}.tar.gz | tar xvf -
|
||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install --upgrade pip setuptools build delocate
|
run: pip install --upgrade pip setuptools build delocate
|
||||||
|
|
||||||
- name: Build wheel for a given version of CPython
|
- name: Build wheel for a given version of CPython
|
||||||
run: |
|
run: |
|
||||||
mkdir wheelhouse/
|
mkdir wheelhouse/
|
||||||
@ -162,16 +162,16 @@ jobs:
|
|||||||
delocate-wheel trexio-*.whl
|
delocate-wheel trexio-*.whl
|
||||||
mv trexio-*.whl ../wheelhouse/
|
mv trexio-*.whl ../wheelhouse/
|
||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
# Some issues with Python 3.10 wheels on MacOS-11
|
# Some issues with Python 3.10 wheels on MacOS-11
|
||||||
- name: Install the wheel
|
- name: Install the wheel
|
||||||
run: python -m pip install wheelhouse/trexio-*.whl
|
run: python -m pip install wheelhouse/trexio-*.whl
|
||||||
working-directory: python
|
working-directory: python
|
||||||
|
|
||||||
- name: Test the wheel
|
- name: Test the wheel
|
||||||
run: python test_api.py
|
run: python test_api.py
|
||||||
working-directory: python/test
|
working-directory: python/test
|
||||||
|
|
||||||
- name: Upload produced wheels as artifacts
|
- name: Upload produced wheels as artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
@ -226,10 +226,9 @@ jobs:
|
|||||||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
# repository_url: https://test.pypi.org/legacy/
|
# repository_url: https://test.pypi.org/legacy/
|
||||||
#verbose: true
|
#verbose: true
|
||||||
|
|
||||||
# Only upload to PyPI if the commit was tagged !
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
#if: startsWith(github.ref, 'refs/tags')
|
||||||
|
Loading…
Reference in New Issue
Block a user