Skip to content

Commit

Permalink
Add workflow based on cibuildwheels
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Jun 9, 2024
1 parent f2b5a7c commit 2c6e83b
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: wheel

on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: assets/ci/python-env.yaml
create-args: |
create-args: >-
meson-python
python-build
- name: Reorganize repository
Expand Down Expand Up @@ -112,11 +113,47 @@ jobs:
path: ./*.whl
retention-days: 5

wheels:
needs:
- sdist
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]

defaults:
run:
shell: bash -l {0}

steps:
# Used to host cibuildwheel
- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.18.1

- name: Download sdist
uses: actions/download-artifact@v4
with:
name: dftd3-python-sdist

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse *.tar.gz
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value

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

release:
needs:
- source
- sdist
- manylinux
- wheels
runs-on: ubuntu-latest
steps:
- name: Download artifacts
Expand Down

0 comments on commit 2c6e83b

Please sign in to comment.