Skip to content

IO for SCF potentials #363

IO for SCF potentials

IO for SCF potentials #363

Workflow file for this run

name: Wheels
on:
release:
types:
- published
- edited
pull_request:
branches:
- main
env:
CIBW_BUILD: "cp39-* cp310-* cp311-*"
CIBW_SKIP: "*-win32 *musllinux*"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
jobs:
build_nix_wheels:
name: Build ${{ matrix.python-version }} wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'docs only')
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
# Note: cibuildwheel builds for many Python versions beyond this one
python-version: "3.9"
# Mac:
- name: Setup Mac
if: runner.os == 'macOS'
run: |
brew install gsl
# Ubuntu:
- name: Setup Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install gsl-bin libgsl0-dev
- name: Build wheels
run: |
python -m pip install cibuildwheel
python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"
- name: Build sdist
run: |
sudo apt-get update
sudo apt-get install gsl-bin libgsl0-dev
pip install pep517
python -m pep517.build -s .
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_nix_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/