-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-factor build CLI to a subcommand based approach
PiperOrigin-RevId: 691466647
- Loading branch information
1 parent
37af100
commit 848eed9
Showing
8 changed files
with
804 additions
and
521 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Presubmit - Windows CPU | ||
on: | ||
# TODO(DO_NOT_SUBMIT): temporary check | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read # to fetch code | ||
actions: write # to cancel previous workflows | ||
|
||
env: | ||
DISTUTILS_USE_SDK: 1 | ||
MSSdk: 1 | ||
|
||
jobs: | ||
presubmit-win-wheels: | ||
if: ${{ (github.event.action != 'labeled') || (github.event.label.name == 'windows:force-run')}} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [windows-2019-32core] | ||
arch: [AMD64] | ||
pyver: ['3.10'] | ||
name: ${{ matrix.os }} Windows build | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/cancel-workflow-action@0.12.1 | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Install LLVM/Clang | ||
run: choco install llvm --version=18.1.4 --yes --no-progress --allow-downgrade | ||
|
||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
cache: 'pip' | ||
|
||
- name: Build wheels | ||
env: | ||
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC" | ||
JAXLIB_RELEASE: true | ||
run: | | ||
python -m pip install -r build/test-requirements.txt | ||
python -m pip install --upgrade numpy==2.0.0 scipy==1.13.1 | ||
"C:\\msys64\\;C:\\msys64\\usr\\bin\\;" >> $env:GITHUB_PATH | ||
python.exe build\build.py jaxlib --verbose ` | ||
--bazel_build_options='--verbose_failures=true' ` | ||
--bazel_build_options="--config=win_clang" ` | ||
--clang_path="C:\Program Files\LLVM\bin\clang.exe" ` | ||
--bazel_build_options='--color=yes' | ||
- name: Run tests | ||
env: | ||
JAX_ENABLE_CHECKS: true | ||
JAX_SKIP_SLOW_TESTS: true | ||
PY_COLORS: 1 | ||
run: | | ||
python -m pip install --find-links ${{ github.workspace }}\dist jaxlib | ||
python -m pip install -e ${{ github.workspace }} | ||
echo "JAX_ENABLE_CHECKS=$JAX_ENABLE_CHECKS" | ||
pytest -n auto --tb=short tests examples |
Oops, something went wrong.