Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Build portable (manylinux_2_28, x86_64) binary wheels of pyace so that
# deployments can `pip install` them instead of compiling the C++ extensions
# on every machine.
#
# Runs on version tags and on demand. Wheels are always attached to the
# workflow run as artifacts; on a tag they are also attached to a GitHub
# Release for that tag.

name: Build wheels

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
pull_request:
paths:
- ".github/workflows/wheels.yml"
workflow_dispatch:

jobs:
build_wheels:
name: Wheel ${{ matrix.python }} (manylinux_2_28 x86_64)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["cp39", "cp310", "cp311", "cp312", "cp313"]

steps:
- uses: actions/checkout@v4
with:
# versioneer derives the version from `git describe`, which needs
# the full history and the tags.
fetch-depth: 0
fetch-tags: true

- name: Build wheel
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_BUILD: ${{ matrix.python }}-manylinux_x86_64
CIBW_ARCHS_LINUX: x86_64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_BEFORE_BUILD: pip install cmake
# Smoke test: every compiled module must import from the repaired
# wheel, outside the source tree.
CIBW_TEST_COMMAND: >-
python -c "import pyace, pyace.sharmonics, pyace.coupling, pyace.basis, pyace.evaluator, pyace.catomicenvironment, pyace.calculator; print(pyace.__version__)"

- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python }}
path: wheelhouse/*.whl

build_sdist:
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

release:
name: Attach to GitHub Release
needs: [build_wheels, build_sdist]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
files: dist/*
11 changes: 10 additions & 1 deletion docs/pacemaker/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ python setup.py install
The `pyace` (aka `python-ace`) package is located in [this repository](https://github.com/ICAMS/python-ace).
It contains the `pacemaker` tools and other Python wrappers and utilities.

To install `pyace`:
Prebuilt binary wheels (manylinux_2_28, x86_64, CPython 3.9-3.13) are attached to every
[GitHub release](https://github.com/pmrv/python-ace/releases). If one matches your platform,
you can skip compiling the C++ extensions:
```
pip install https://github.com/pmrv/python-ace/releases/download/<tag>/<wheel-file>.whl
```
Wheels for untagged commits can be built on demand with the "Build wheels" workflow under
the repository's Actions tab and downloaded from the workflow run.

To install `pyace` from source:

* Download `pyace` from [this repository](https://github.com/ICAMS/python-ace). Clone with
```
Expand Down
Loading