build(deps): Bump the actions-version group with 7 updates #2758
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build wheels | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
# Trigger on pushes to the mainline branches and version tags. This prevents building commits | |
# twice when the pull request source branch is in the same repository. | |
push: | |
branches: | |
- "main" | |
- "next" | |
tags: | |
- "v*" | |
pull_request: | |
types: [opened, labeled, reopened, synchronize] | |
# Trigger on request. | |
workflow_dispatch: | |
env: | |
UV_VERSION: 0.2.2 | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
jobs: | |
build_wheels: | |
name: Build wheels [${{ matrix.python.version }}, ${{ matrix.os.base }}-${{ matrix.os.arch }}] | |
runs-on: ${{ matrix.os.base }}-${{ matrix.os.version }} | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'build_wheels') || github.event_name != 'pull_request' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- base: ubuntu | |
version: latest | |
arch: 'x86_64' | |
# - base: windows | |
# version: latest | |
# arch: 'amd64' | |
- base: macos | |
version: 14 | |
arch: 'arm64' | |
- base: macos | |
version: 13 | |
arch: 'x86_64' | |
python: | |
# Pinned versions installed in CIBW_TEST_REQIURES are kept. Those defined installed in | |
# CIBW_BEFORE_TEST are often upgraded when the wheel is installed. This means we can't | |
# store the pinned requirements in a requirements file. | |
# Generate these version sets with commands like this: | |
# echo -e "numpy==1.21.6\nscipy\ngsd\nmatplotlib\nsympy" | uv pip compile --python-platform linux --python-version 3.9 --only-binary :all: - --resolution=lowest --no-deps | |
- version: 'cp39' | |
oldest_numpy: '1.22.4' | |
oldest_scipy: '1.7.3' | |
oldest_gsd: '2.5.0' | |
oldest_matplotlib: '3.5.0' | |
oldest_pytest: '8.2.1' | |
oldest_sympy: '1.10' | |
- version: 'cp310' | |
oldest_numpy: '1.22.4' | |
oldest_scipy: '1.7.3' | |
oldest_gsd: '2.7.0' | |
oldest_matplotlib: '3.5.0' | |
oldest_pytest: '8.2.1' | |
oldest_sympy: '1.10' | |
- version: 'cp311' | |
oldest_numpy: '1.23.2' | |
oldest_scipy: '1.9.2' | |
oldest_gsd: '2.7.0' | |
oldest_matplotlib: '3.6.0' | |
oldest_pytest: '8.2.1' | |
oldest_sympy: '1.10' | |
- version: 'cp312' | |
oldest_numpy: '1.26.2' | |
oldest_scipy: '1.11.2' | |
oldest_gsd: '3.2.0' | |
oldest_matplotlib: '3.7.3' | |
oldest_pytest: '8.2.1' | |
oldest_sympy: '1.10' | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
submodules: "recursive" | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.21.3 | |
env: | |
CIBW_BUILD: "${{ matrix.python.version }}-*" | |
CIBW_SKIP: "{pp*,*-musllinux_*}" | |
# Build only on 64-bit architectures. | |
CIBW_ARCHS: auto64 | |
# Configure environment variables. | |
CIBW_ENVIRONMENT_LINUX: "CMAKE_PREFIX_PATH=/project/tbb LD_LIBRARY_PATH=/project/tbb/lib/intel64/gcc4.8:$LD_LIBRARY_PATH" | |
CIBW_ENVIRONMENT_MACOS: "CMAKE_PREFIX_PATH=/Users/runner/work/freud/freud/tbb:/Users/runner/work/tbb-install LD_LIBRARY_PATH=/Users/runner/work/freud/freud/tbb/lib/intel64/gcc4.8:$LD_LIBRARY_PATH" | |
MACOSX_DEPLOYMENT_TARGET: "10.14" | |
# Set up TBB. | |
CIBW_BEFORE_BUILD_LINUX: "source .github/workflows/cibuildwheel-before-build.sh {package} linux" | |
CIBW_BEFORE_BUILD_MACOS: "source .github/workflows/cibuildwheel-before-build.sh {package} macos" | |
CIBW_BEFORE_BUILD_WINDOWS: "powershell .github/workflows/cibuildwheel-before-build.ps1 {package}" | |
# Test the wheels. | |
CIBW_TEST_REQUIRES: > | |
pytest==${{ matrix.python.oldest_pytest }} | |
sympy==${{ matrix.python.oldest_sympy }} | |
numpy==${{ matrix.python.oldest_numpy }} | |
scipy==${{ matrix.python.oldest_scipy }} | |
gsd==${{ matrix.python.oldest_gsd }} | |
matplotlib==${{ matrix.python.oldest_matplotlib }} | |
CIBW_TEST_COMMAND: "cd {package}/tests && pytest . -v --log-level=DEBUG" | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: dist-${{ matrix.os.base }}-${{ matrix.os.version }}-${{ matrix.python.version }} | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'build_wheels') || github.event_name != 'pull_request' }} | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
submodules: "recursive" | |
- uses: actions/setup-python@v5.3.0 | |
name: Install Python | |
with: | |
python-version: '3.12' | |
- name: Install uv | |
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/${{ env.UV_VERSION }}/uv-installer.sh | bash | |
- name: Install build | |
run: 'uv pip install -r .github/requirements-build-sdist.txt --only-binary :all: --system --reinstall' | |
- name: Build sdist | |
run: python -m build --sdist --outdir dist/ . | |
- uses: actions/upload-artifact@v4.4.3 | |
with: | |
name: dist-sdist | |
path: dist/*.tar.gz | |
upload_pypi: | |
name: Publish [PyPI] | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
concurrency: upload | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'build_wheels') || github.event_name != 'pull_request' }} | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4.1.8 | |
with: | |
merge-multiple: 'true' | |
pattern: dist-* | |
path: dist | |
- name: Check files | |
run: ls -lR dist | |
- name: Upload to PyPI | |
# upload to PyPI on every tag starting with 'v' | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@v1.11.0 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Slack notification | |
if: startsWith(github.ref, 'refs/tags/v') || failure() | |
uses: act10ns/slack@v2.1.0 | |
with: | |
status: ${{ job.status }} | |
channel: '#dev-freud' |