Skip to content

Commit

Permalink
CI: Make a wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcl committed Feb 6, 2025
1 parent 9f5ab82 commit 928be40
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: ["main"]
branches: ["**"] # For now, let's build all branches. Roll this back if it gets too slow or we exhaust our quota.
pull_request:
branches: ["**"] # * does not match '/'
workflow_dispatch: # For manually triggering a build: https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
Expand Down Expand Up @@ -41,3 +41,12 @@ jobs:
working-directory: ./interop
run: |
pytest
- name: Make a wheel
# https://github.com/pypa/cibuildwheel
run: |
pip install cibuildwheel
bin/make-wheel
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
10 changes: 9 additions & 1 deletion bin/make-wheel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ cp $ROOT/interop/pyproject.toml $WHEEL_DIR
cp $ROOT/interop/MANIFEST.in $WHEEL_DIR

cd $WHEEL_DIR
python -m build

if [ -z "${GITHUB_RUN_ID+x}" ]; then
echo "Building wheel locally"
python -m build
else
# https://github.com/pypa/cibuildwheel
echo "Building wheel via GitHub Actions"
python -m cibuildwheel --output-dir $WHEEL_DIR/wheelhouse
fi

# To upload the wheel, with the proper token in ~/.pypirc, run
#
Expand Down

0 comments on commit 928be40

Please sign in to comment.