Skip to content

0.0.16

0.0.16 #94

Workflow file for this run

name: release-main
on:
workflow_dispatch:
release:
types: [published]
branches: [main]
jobs:
build:
strategy:
matrix:
os:
[
macos-15-intel,
windows-latest,
ubuntu-latest,
ubuntu-24.04-arm,
macos-15,
]
glibc: [2_28, 2_34]
fail-fast: false
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 2
- name: remove nativelibs and localsolvers
run: rm -rf vcell_submodule/nativelibs vcell_submodule/localsolvers
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: abatilo/actions-poetry@v3
- name: setup graalvm for static native build
uses: graalvm/setup-graalvm@v1
with:
java-version: "23"
distribution: "graalvm-community"
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: "true"
cache: "maven"
- name: Set MACOSX_DEPLOYMENT_TARGET used by cibuildwheel
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> $GITHUB_ENV
echo "NATIVE_IMAGE_OPTIONS=--native-compiler-options=-mmacosx-version-min=13.0 -H:NativeLinkerOption=-mmacosx-version-min=13.0" >> $GITHUB_ENV
- name: Set cibuildwheel archs
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
ARCH=$(uname -m)
echo "ARCH_DEF=$ARCH" >> $GITHUB_ENV
echo "MANYLINUX_IMAGE_TARGET=ghcr.io/virtualcell/manylinux_${{ matrix.glibc }}_$ARCH:latest" >> $GITHUB_ENV
CIBW_BUILD_STRING="cp310-*${{ env.ARCH_DEF }} cp311-*${{ env.ARCH_DEF }} cp312-*${{ env.ARCH_DEF }} cp313-*${{ env.ARCH_DEF }}"
if [ "${{ matrix.glibc }}" = "2_34" ]; then
CIBW_BUILD_STRING="$CIBW_BUILD_STRING cp314-*${{ env.ARCH_DEF }}"
fi
echo "CIBW_BUILD_TARGETS=$CIBW_BUILD_STRING" >> $GITHUB_ENV
- name: Run cibuildwheel (Ubuntu, x86_64)
uses: pypa/cibuildwheel@v3.4.0
if: ${{ startsWith(matrix.os, 'ubuntu') && env.ARCH_DEF == 'x86_64' }}
env:
CIBW_BUILD: "${{ env.CIBW_BUILD_TARGETS }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ env.MANYLINUX_IMAGE_TARGET }}"
# CIBW_BUILD_VERBOSITY_LINUX: 2
- name: Run cibuildwheel (Ubuntu, aarch64)
uses: pypa/cibuildwheel@v3.4.0
if: ${{ startsWith(matrix.os, 'ubuntu') && env.ARCH_DEF == 'aarch64' }}
env:
CIBW_BUILD: "${{ env.CIBW_BUILD_TARGETS }}"
CIBW_MANYLINUX_AARCH64_IMAGE: "${{ env.MANYLINUX_IMAGE_TARGET }}"
# CIBW_BUILD_VERBOSITY_LINUX: 2
- name: Run cibuildwheel
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
run: |
pip install cibuildwheel
cibuildwheel --debug-traceback --output-dir wheelhouse
env:
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
- name: Copy wheels to dist directory
run: |
mkdir -p dist
cp wheelhouse/*.whl dist/
- name: Publish to PyPI (dry run)
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
poetry publish --dry-run
- name: Publish to PyPI (release-only - push to PyPI)
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
poetry publish --skip-existing
if: github.event_name == 'release'
- name: Setup tmate
if: failure()
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
deploy-docs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: abatilo/actions-poetry@v3
- name: setup graalvm for static native build
uses: graalvm/setup-graalvm@v1
with:
java-version: "23"
distribution: "graalvm-community"
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: "true"
cache: "maven"
- name: Install python dependencies
run: poetry install --no-interaction
- name: Deploy documentation
run: poetry run mkdocs gh-deploy --force