Enable wheels for MacOS (#35) #7
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: Release for Macos | |
on: | |
push: | |
tags: | |
- 'v[0-9]+\.[0-9]+\.[0-9]+' | |
jobs: | |
release: | |
runs-on: macos-11 | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- name: Cancel previous run | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build | |
run: | | |
pip install -r requirements.txt | |
bazel build --config=macos_x86_64 --remote_cache=http://${{ secrets.BAZEL_CACHE }}:8080 @maple2jax//:jax_xc_wheel | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: macos_wheel | |
path: bazel-bin/external/maple2jax/*.whl | |
publish: | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@main | |
with: | |
name: macos_wheel | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |