Skip to content

Change version

Change version #83

Workflow file for this run

name: Test dhn_med_py
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install setuptools
pip install wheel
pip install numpy
shell: bash
- name: Parse medlib flags
run: python scripts/parse_medlib_flags.py
shell: bash
- name: Build package
run: python -m build
shell: bash
- name: Install package
run: python -m pip install .
shell: bash
- name: Test package
run: python -m unittest test/dhn_med_py_test.py
shell: bash
release:
if: contains(github.ref, 'refs/tags/')
needs: test
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
buildplat:
- [ubuntu-22.04, manylinux_x86_64]
- [macos-13, macosx_x86_64]
- [macos-14, macosx_arm64]
- [windows-latest, win_amd64]
python: ["cp39", "cp310", "cp311", "cp312"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
pip install setuptools
pip install numpy
pip install twine
shell: bash
- name: Parse medlib flags
run: python scripts/parse_medlib_flags.py
shell: bash
- name: Build wheels
run: python -m cibuildwheel --output-dir dist/
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
shell: bash
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --skip-existing dist/dhn_med_py*
shell: bash