Skip to content

update version and release workflow #14

update version and release workflow

update version and release workflow #14

Workflow file for this run

name: release
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
build-linux-cp38:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@master
- name: Install Python package dependencies
run: /opt/python/cp38-cp38/bin/python -m pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: /opt/python/cp38-cp38/bin/python setup.py bdist_wheel
- name: Apply auditwheel for manylinux wheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.8
path: dist
build-linux-cp39:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@master
- name: Install Python package dependencies
run: /opt/python/cp39-cp39/bin/python -m pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: /opt/python/cp39-cp39/bin/python setup.py bdist_wheel
- name: Apply auditwheel for manylinux wheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.9
path: dist
build-linux-cp310:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@master
- name: Install Python package dependencies
run: /opt/python/cp310-cp310/bin/python -m pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: /opt/python/cp310-cp310/bin/python setup.py bdist_wheel
- name: Apply auditwheel for manylinux wheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.10
path: dist
build-linux-cp311:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@master
- name: Install Python package dependencies
run: /opt/python/cp311-cp311/bin/python -m pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: /opt/python/cp311-cp311/bin/python setup.py bdist_wheel
- name: Apply auditwheel for manylinux wheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.11
path: dist
build-linux-cp312:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@master
- name: Install Python package dependencies
run: /opt/python/cp312-cp312/bin/python -m pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: /opt/python/cp312-cp312/bin/python setup.py bdist_wheel
- name: Apply auditwheel for manylinux wheel
run: auditwheel repair -w dist dist/*
- name: Remove linux wheel
run: rm dist/*-linux_x86_64.whl
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-linux-3.12
path: dist
build-macos:
runs-on: macos-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }} x64
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install Python package dependencies
run: pip install cython wheel numpy scipy ase jax jaxlib
- name: Build binary wheel
run: python setup.py bdist_wheel
- name: Archive dist artifacts
uses: actions/upload-artifact@v1
with:
name: dist-macos-${{ matrix.python-version }}
path: dist
upload:
needs: [build-linux-cp38, build-linux-cp39, build-linux-cp310, build-linux-cp311, build-linux-cp312, build-macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Create source dist
run: python setup.py sdist
- name: Stage linux 3.8
uses: actions/download-artifact@v1
with:
name: dist-linux-3.8
- run: mv -v dist-linux-3.8/* dist/
- name: Stage linux 3.9
uses: actions/download-artifact@v1
with:
name: dist-linux-3.9
- run: mv -v dist-linux-3.9/* dist/
- name: Stage linux 3.10
uses: actions/download-artifact@v1
with:
name: dist-linux-3.10
- run: mv -v dist-linux-3.10/* dist/
- name: Stage linux 3.11
uses: actions/download-artifact@v1
with:
name: dist-linux-3.11
- run: mv -v dist-linux-3.11/* dist/
- name: Stage linux 3.12
uses: actions/download-artifact@v1
with:
name: dist-linux-3.12
- run: mv -v dist-linux-3.12/* dist/
- name: Stage macos 3.8
uses: actions/download-artifact@v1
with:
name: dist-macos-3.8
- run: mv -v dist-macos-3.8/* dist/
- name: Stage macos 3.9
uses: actions/download-artifact@v1
with:
name: dist-macos-3.9
- run: mv -v dist-macos-3.9/* dist/
- name: Stage macos 3.10
uses: actions/download-artifact@v1
with:
name: dist-macos-3.10
- run: mv -v dist-macos-3.10/* dist/
- name: Stage macos 3.11
uses: actions/download-artifact@v1
with:
name: dist-macos-3.11
- run: mv -v dist-macos-3.11/* dist/
- name: Stage macos 3.12
uses: actions/download-artifact@v1
with:
name: dist-macos-3.12
- run: mv -v dist-macos-3.12/* dist/
- name: Upload with twine
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
ls -l dist/*
pip install twine
twine upload dist/*