Skip to content

Merge pull request #310 from VirtualPlanetaryLaboratory/download-arti… #56

Merge pull request #310 from VirtualPlanetaryLaboratory/download-arti…

Merge pull request #310 from VirtualPlanetaryLaboratory/download-arti… #56

Workflow file for this run

name: pip-install
on:
release:
types: [published]
jobs:
build_wheels:
name: Building wheel for ${{ matrix.os }}:Python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
exclude:
- os: ubuntu-22.04
python-version: '3.6'
- os: macos-14
python-version: '3.6'
- os: macos-14
python-version: '3.7'
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build wheel on Linux
if: runner.os == 'Linux'
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: 'cp3?-*'
CIBW_SKIP: '*-manylinux_i686'
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
- name: Build wheel on macOS
if: runner.os == 'macOS'
run: |
python -m cibuildwheel --output-dir wheelhouse
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/*.whl
build_sdist:
name: Building source for ${{ matrix.os }}:Python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-14]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11']
exclude:

Check failure on line 63 in .github/workflows/pip-install.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pip-install.yml

Invalid workflow file

You have an error in your yaml syntax on line 63
- os: ubuntu-22.04
python-version: '3.6'
- os: macos-14
python-version: '3.6'
- os: macos-14
python-version: '3.7'
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
- name: Build sdist
run: python setup.py sdist
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
with:
name: sdist-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: wheel-${{ matrix.os }}-${{ matrix.python-version }}
path: wheelhouse
- uses: actions/download-artifact@v4
with:
name: sdist-${{ matrix.os }}-${{ matrix.python-version }}
path: dist
# Only push to PyPI if we're on the public repo!
- uses: pypa/gh-action-pypi-publish@release/v1
if: (!github.event.release.prerelease) && github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet'
with:
user: __token__
password: ${{ secrets.pypi_password }}