Skip to content

Refactor to support windows (#37) #55

Refactor to support windows (#37)

Refactor to support windows (#37) #55

Workflow file for this run

name: Release for Windows
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
release:
runs-on: windows-2019
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=windows --remote_cache=http://${{ secrets.BAZEL_CACHE }}:8080 @jax_xc_repo//:jax_xc_wheel
shell: pwsh
- name: Test the wheel
run: |
pip install $(ls bazel-bin/external/jax_xc_repo/*.whl)
python3 tests/test_wheel.py
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: windows_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: windows_wheel
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}