Skip to content

Refactor to support windows (#37) #3

Refactor to support windows (#37)

Refactor to support windows (#37) #3

Workflow file for this run

# Action name
name: Release for Linux
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
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=linux --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: linux_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: linux_wheel
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}