Implement merge-read-extract. #840
Workflow file for this run
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
name: Publish sdist and wheels for macos, and manylinux, publish to pypi if a release | |
on: [pull_request, push] | |
env: | |
CIBW_BUILD_VERBOSITY: 3 | |
CIBW_BUILD: 'cp*' | |
CIBW_SKIP: 'cp35-* cp36-* cp37-* *-musllinux_* *-manylinux_i686' | |
CIBW_TEST_COMMAND: ( cd {project}/python/tests; python -m unittest -v ) | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.11' | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel | |
- name: Build wheels on Linux | |
if: runner.os == 'Linux' | |
run: | | |
# note: config is stored in pyproject.toml now | |
CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014 python -m cibuildwheel --output-dir dist | |
CIBW_MANYLINUX_X86_64_IMAGE=manylinux_2_28 python -m cibuildwheel --output-dir dist | |
- name: Build wheels Mac OS | |
if: runner.os == 'macOS' | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '10.13' | |
CIBW_BEFORE_BUILD: | | |
brew update | |
brew --version | |
brew install cmake | |
brew install hdf5 | |
run: | | |
python -m cibuildwheel --output-dir dist | |
- name: Store wheel as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/*.whl | |
build_sdist: | |
name: Build sdist | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install packages | |
run: sudo apt-get update && sudo apt-get install libhdf5-dev | |
- name: Build a source tarball, check it installs | |
run: | |
./ci/python_build_sdist.sh | |
- name: Store sdist as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/*.tar.gz | |
upload_artifacts: | |
name: Upload wheels to PyPI | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
needs: [build_wheels, build_sdist] | |
steps: | |
- name: Download artifacts produced during the build_wheels and build_sdist jobs | |
uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: dist/ | |
- name: Display structure of downloaded files | |
run: ls -R | |
working-directory: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_PASSWORD }} | |
packages_dir: dist/ |