Skip to content

trigger

trigger #10

Workflow file for this run

name: Release for Macos
on: [push]
jobs:
release:
runs-on: macos-latest-xlarge
strategy:
matrix:
python-version: ['3.9']
steps:
- name: Cancel previous run
uses: styfle/cancel-workflow-action@0.9.1
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 --remote_cache=http://${{ secrets.BAZEL_CACHE }}:8080 @jax_xc_repo//:jax_xc_wheel
- name: Test the wheel
run: |
pip install $(ls bazel-bin/external/jax_xc_repo/*.whl)
python3 tests/test_wheel.py
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: macos_wheel
path: bazel-bin/external/jax_xc_repo/*.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 }}