Skip to content

Commit

Permalink
Add support for Github Actions build of jaxlib on Winx64
Browse files Browse the repository at this point in the history
  • Loading branch information
mlxd committed Mar 15, 2023
1 parent 1301968 commit 94235fc
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/wheel_win_x64.yml
@@ -0,0 +1,85 @@
name: Wheel::Windows::x86_64
on:
pull_request:
push:
branches:
- master
release:
types: [published]

env:
DISTUTILS_USE_SDK: 1
MSSdk: 1

jobs:
win-wheels:
strategy:
fail-fast: true
matrix:
os: [windows-2019]
arch: [AMD64]
pyver: ['3.8', '3.9', '3.10', '3.11']
name: ${{ matrix.os }} jaxlib Wheel-builder
runs-on: ${{ matrix.os }}

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyver }}
cache: 'pip'

- name: Build wheels
env:
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC"
run: |
python -m pip install -r build/test-requirements.txt
"C:\\msys64\\;C:\\msys64\\usr\\bin\\;" >> $env:GITHUB_PATH
python.exe build\build.py `
--noenable_tpu `
--noenable_remote_tpu `
--noenable_mkl_dnn `
--target_cpu_features release `
--noenable_plugin_device `
--noremote_build `
--noenable_cuda `
--configure_only
bazel build --jobs=1 --subcommands `
--cxxopt="/Zm2000" `
--verbose_failures `
--jobs=1 `
--discard_analysis_cache `
--notrack_incremental_state `
--nokeep_state_after_build `
--experimental_local_memory_estimate="true" `
--local_ram_resources=2048 `
//jaxlib
bazel run `
--verbose_failures=true `
//build:build_wheel -- `
--output_path=$(Join-Path -Path (Get-Location) -ChildPath "\tmp") `
--cpu="AMD64"
- name: Run tests
env:
JAX_ENABLE_CHECKS: true
JAX_SKIP_SLOW_TESTS: true
run: |
python -m pip install -e ${{ github.workspace }}
python -m pip install --no-index --find-links ${{ github.workspace }}\dist jaxlib
echo "JAX_ENABLE_CHECKS=$JAX_ENABLE_CHECKS"
pytest -n auto --tb=short tests examples
- uses: actions/upload-artifact@v2
with:
name: jaxlib_wheels
path: ${{ github.workspace }}\dist\*.whl

0 comments on commit 94235fc

Please sign in to comment.