Skip to content

Commit b28ff8a

Browse files
committed
Merge branch 'srnitin/test-scripts-workflows' of https://github.com/google-ml-infra/jax-fork into srnitin/test-scripts-workflows
2 parents 1b20f8c + 4ccc3c5 commit b28ff8a

File tree

358 files changed

+24067
-13616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

358 files changed

+24067
-13616
lines changed

.bazelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# All default build options below. These apply to all build commands.
33
# #############################################################################
44
# Make Bazel print out all options from rc files.
5-
build --announce_rc
5+
common --announce_rc
66

77
# By default, execute all actions locally.
88
build --spawn_strategy=local
@@ -11,7 +11,7 @@ build --spawn_strategy=local
1111
# automatically when building on Linux.
1212
build --enable_platform_specific_config
1313

14-
build --experimental_cc_shared_library
14+
common --experimental_cc_shared_library
1515

1616
# Do not use C-Ares when building gRPC.
1717
build --define=grpc_no_ares=true
@@ -236,7 +236,7 @@ build:ci_linux_aarch64_cuda --config=cuda --config=build_cuda_with_nvcc
236236
build:ci_linux_aarch64_cuda --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-18/bin/clang"
237237

238238
# Mac x86 CI configs
239-
build:ci_darwin_x86_64 --macos_minimum_os=10.14
239+
build:ci_darwin_x86_64 --macos_minimum_os=11.0
240240
build:ci_darwin_x86_64 --config=macos_cache_push
241241
build:ci_darwin_x86_64 --verbose_failures=true
242242
build:ci_darwin_x86_64 --color=yes

.github/workflows/bazel_cpu_rbe.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ on:
1414
pull_request:
1515
branches:
1616
- main
17+
push:
18+
branches:
19+
- main
20+
- 'release/**'
1721

1822
concurrency:
1923
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
20-
cancel-in-progress: true
24+
# Don't cancel in-progress jobs for main/release branches.
25+
cancel-in-progress: ${{ !contains(github.ref, 'release/') && github.ref != 'main' }}
2126

2227
jobs:
2328
run_tests:
@@ -26,14 +31,22 @@ jobs:
2631
container: ${{ (contains(matrix.runner, 'linux-x86') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest') ||
2732
(contains(matrix.runner, 'linux-arm64') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-arm64:latest') }}
2833
env:
29-
JAXCI_HERMETIC_PYTHON_VERSION: "3.12"
34+
JAXCI_HERMETIC_PYTHON_VERSION: ${{ matrix.python }}
3035
JAXCI_ENABLE_X64: ${{ matrix.enable-x_64 }}
3136
# Begin Presubmit Naming Check - name modification requires internal check to be updated
3237
strategy:
3338
matrix:
39+
python: ["3.10", "3.13"]
3440
runner: ["linux-x86-n2-16", "linux-arm64-c4a-16"]
3541
enable-x_64: [1, 0]
36-
name: "Bazel CPU tests (${{ matrix.runner }}, Python 3.12, x64=${{ matrix.enable-x_64 }})"
42+
exclude:
43+
# Exclude x64=1 on the oldest Python and x64=0 on the newest Python. As long as we have
44+
# coverage for one of each, we don't need to run both.
45+
- python: "3.10"
46+
enable-x_64: 1
47+
- python: "3.13"
48+
enable-x_64: 0
49+
name: "Bazel CPU tests (${{ matrix.runner }}, Python ${{ matrix.python }}, x64=${{ matrix.enable-x_64 }})"
3750
# End Presubmit Naming Check github-cpu-presubmits
3851
steps:
3952
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/bazel_cuda_non_rbe.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
gcs_download_uri:
3333
description: "GCS location URI from where the artifacts should be downloaded"
3434
required: true
35-
default: 'gs://general-ml-ci-transient/jax-github-actions/jax-fork/${{ github.workflow }}/${{ github.run_number }}/${{ github.run_attempt }}'
35+
default: 'gs://general-ml-ci-transient/jax-github-actions/jax/${{ github.workflow }}/${{ github.run_number }}/${{ github.run_attempt }}'
3636
type: string
3737
halt-for-connection:
3838
description: 'Should this workflow run wait for a remote connection?'
@@ -42,6 +42,10 @@ on:
4242

4343
jobs:
4444
run-tests:
45+
defaults:
46+
run:
47+
# Explicitly set the shell to bash
48+
shell: bash
4549
runs-on: ${{ inputs.runner }}
4650
container: "us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-cudnn9.1-cuda12.3:720686788"
4751

@@ -68,11 +72,23 @@ jobs:
6872
echo "ARCH=${arch}" >> $GITHUB_ENV
6973
echo "PYTHON_MAJOR_MINOR=${python_major_minor}" >> $GITHUB_ENV
7074
- name: Download the wheel artifacts from GCS
75+
id: download-wheel-artifacts
76+
# Set continue-on-error to true to prevent actions from failing the workflow if this step
77+
# fails. Instead, we verify the outcome in the next step so that we can print a more
78+
# informative error message.
79+
continue-on-error: true
7180
run: >-
7281
mkdir -p $(pwd)/dist &&
7382
gsutil -m cp -r "${{ inputs.gcs_download_uri }}/jaxlib*${PYTHON_MAJOR_MINOR}*${OS}*${ARCH}*.whl" $(pwd)/dist/ &&
7483
gsutil -m cp -r "${{ inputs.gcs_download_uri }}/jax*cuda*plugin*${PYTHON_MAJOR_MINOR}*${OS}*${ARCH}*.whl" $(pwd)/dist/ &&
7584
gsutil -m cp -r "${{ inputs.gcs_download_uri }}/jax*cuda*pjrt*${OS}*${ARCH}*.whl" $(pwd)/dist/
85+
- name: Skip the test run if the wheel artifacts were not downloaded successfully
86+
if: steps.download-wheel-artifacts.outcome == 'failure'
87+
run: |
88+
echo "Failed to download wheel artifacts from GCS. Please check if the wheels were"
89+
echo "built successfully by the artifact build jobs and are available in the GCS bucket."
90+
echo "Skipping the test run."
91+
exit 1
7692
# Halt for testing
7793
- name: Wait For Connection
7894
uses: google-ml-infra/actions/ci_connection@main

.github/workflows/bazel_cuda_rbe.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,37 @@ on:
1414
pull_request:
1515
branches:
1616
- main
17+
push:
18+
branches:
19+
- main
20+
- 'release/**'
1721

1822
concurrency:
1923
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
20-
cancel-in-progress: true
24+
# Don't cancel in-progress jobs for main/release branches.
25+
cancel-in-progress: ${{ !contains(github.ref, 'release/') && github.ref != 'main' }}
2126

2227
jobs:
2328
run_tests:
2429
runs-on: ${{ matrix.runner }}
2530
container: 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest'
2631
env:
27-
JAXCI_HERMETIC_PYTHON_VERSION: "3.12"
32+
JAXCI_HERMETIC_PYTHON_VERSION: ${{ matrix.python }}
2833
JAXCI_ENABLE_X64: ${{ matrix.enable-x_64 }}
2934
# Begin Presubmit Naming Check - name modification requires internal check to be updated
3035
strategy:
3136
matrix:
37+
python: ["3.10", "3.13"]
3238
runner: ["linux-x86-n2-16"]
3339
enable-x_64: [1, 0]
34-
name: "Bazel single accelerator CUDA tests (${{ matrix.runner }}, Python 3.12, x64=${{ matrix.enable-x_64 }})"
40+
exclude:
41+
# Exclude x64=1 on the oldest Python and x64=0 on the newest Python. As long as we have
42+
# coverage for one of each, we don't need to run both.
43+
- python: "3.10"
44+
enable-x_64: 1
45+
- python: "3.13"
46+
enable-x_64: 0
47+
name: "Bazel single accelerator CUDA tests (${{ matrix.runner }}, Python ${{ matrix.python }}, x64=${{ matrix.enable-x_64 }})"
3548
# End Presubmit Naming Check github-cuda-presubmits
3649
steps:
3750
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/ci-build.yaml

Lines changed: 19 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
steps:
3232
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333
- name: Set up Python 3.11
34-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
34+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3535
with:
3636
python-version: 3.11
3737
- run: python -m pip install pre-commit
@@ -70,22 +70,13 @@ jobs:
7070
apt update
7171
apt install -y libssl-dev
7272
- name: Set up Python ${{ matrix.python-version }}
73-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
73+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
7474
with:
7575
python-version: ${{ matrix.python-version }}
76-
- name: Get pip cache dir
77-
id: pip-cache
78-
run: |
79-
python -m pip install --upgrade pip wheel
80-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
81-
- name: pip cache
82-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
83-
with:
84-
path: ${{ steps.pip-cache.outputs.dir }}
85-
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
8676
- name: Install dependencies
8777
run: |
88-
pip install .[minimum-jaxlib] -r build/test-requirements.txt
78+
pip install uv
79+
uv pip install --system .[minimum-jaxlib] -r build/test-requirements.txt
8980
9081
- name: Run tests
9182
env:
@@ -117,30 +108,21 @@ jobs:
117108
steps:
118109
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
119110
- name: Set up Python ${{ matrix.python-version }}
120-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
111+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
121112
with:
122113
python-version: ${{ matrix.python-version }}
123-
- name: Get pip cache dir
124-
id: pip-cache
125-
run: |
126-
python -m pip install --upgrade pip wheel
127-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
128-
- name: pip cache
129-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
130-
with:
131-
path: ${{ steps.pip-cache.outputs.dir }}
132-
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
133114
- name: Install dependencies
134115
run: |
135-
pip install -r docs/requirements.txt
116+
pip install uv
117+
uv pip install --system -r docs/requirements.txt
136118
- name: Test documentation
137119
env:
138120
XLA_FLAGS: "--xla_force_host_platform_device_count=8"
139121
JAX_TRACEBACK_FILTERING: "off"
140122
JAX_ARRAY: 1
141123
PY_COLORS: 1
142124
run: |
143-
pytest -n auto --tb=short --doctest-glob='*.md' --doctest-glob='*.rst' docs --doctest-continue-on-failure --ignore=docs/multi_process.md
125+
pytest -n auto --tb=short --doctest-glob='*.md' --doctest-glob='*.rst' docs --doctest-continue-on-failure --ignore=docs/multi_process.md
144126
pytest -n auto --tb=short --doctest-modules jax --ignore=jax/config.py --ignore=jax/experimental/jax2tf --ignore=jax/_src/lib/mlir --ignore=jax/_src/lib/triton.py --ignore=jax/_src/lib/mosaic_gpu.py --ignore=jax/interpreters/mlir.py --ignore=jax/experimental/array_serialization --ignore=jax/collect_profile.py --ignore=jax/_src/tpu_custom_call.py --ignore=jax/experimental/mosaic --ignore=jax/experimental/pallas --ignore=jax/_src/pallas --ignore=jax/lib/xla_extension.py
145127
146128
@@ -160,22 +142,13 @@ jobs:
160142
apt update
161143
apt install -y libssl-dev libsqlite3-dev
162144
- name: Set up Python ${{ matrix.python-version }}
163-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
145+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
164146
with:
165147
python-version: ${{ matrix.python-version }}
166-
- name: Get pip cache dir
167-
id: pip-cache
168-
run: |
169-
python -m pip install --upgrade pip wheel
170-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
171-
- name: pip cache
172-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
173-
with:
174-
path: ${{ steps.pip-cache.outputs.dir }}
175-
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
176148
- name: Install dependencies
177149
run: |
178-
pip install -r docs/requirements.txt
150+
pip install uv
151+
uv pip install --system -r docs/requirements.txt
179152
- name: Render documentation
180153
run: |
181154
sphinx-build -j auto --color -W --keep-going -b html -D nb_execution_mode=off docs docs/build/html
@@ -195,22 +168,13 @@ jobs:
195168
steps:
196169
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
197170
- name: Set up Python ${{ matrix.python-version }}
198-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
171+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
199172
with:
200173
python-version: ${{ matrix.python-version }}
201-
- name: Get pip cache dir
202-
id: pip-cache
203-
run: |
204-
python -m pip install --upgrade pip wheel
205-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
206-
- name: pip cache
207-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
208-
with:
209-
path: ${{ steps.pip-cache.outputs.dir }}
210-
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
211174
- name: Install dependencies
212175
run: |
213-
pip install .[minimum-jaxlib] tensorflow -r build/test-requirements.txt
176+
pip install uv
177+
uv pip install --system .[minimum-jaxlib] tensorflow -r build/test-requirements.txt
214178
215179
- name: Run tests
216180
env:
@@ -236,23 +200,15 @@ jobs:
236200
steps:
237201
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
238202
- name: Set up Python
239-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
203+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
240204
with:
241205
python-version: 3.12
242-
- name: Get pip cache dir
243-
id: pip-cache
244-
run: |
245-
python -m pip install --upgrade pip wheel
246-
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
247-
- name: pip cache
248-
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
249-
with:
250-
path: ${{ steps.pip-cache.outputs.dir }}
251-
key: ${{ runner.os }}-pip-ffi-examples-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt', 'examples/**/pyproject.toml') }}
252206
- name: Install JAX
253-
run: pip install .[cuda12]
207+
run: |
208+
pip install uv
209+
uv pip install --system .[cuda12]
254210
- name: Build and install example project
255-
run: python -m pip install -v ./examples/ffi[test]
211+
run: uv pip install --system ./examples/ffi[test]
256212
env:
257213
# We test building using GCC instead of clang. All other JAX builds use
258214
# clang, but it is useful to make sure that FFI users can compile using

.github/workflows/cloud-tpu-ci-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
python-version: ["3.10"]
3434
name: "TPU test (jaxlib=${{ matrix.jaxlib-version }}, ${{ matrix.tpu.type }})"
3535
env:
36-
LIBTPU_OLDEST_VERSION_DATE: 20240922
36+
LIBTPU_OLDEST_VERSION_DATE: 20241118
3737
PYTHON: python${{ matrix.python-version }}
3838
runs-on: ${{ matrix.tpu.runner }}
3939
container: "us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest"

.github/workflows/cloud-tpu-ci-presubmit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
pull_request:
1818
branches:
1919
- main
20+
push:
21+
branches:
22+
- main
23+
- 'release/**'
2024

2125
# This should also be set to read-only in the project settings, but it's nice to
2226
# document and enforce the permissions here.
@@ -25,7 +29,8 @@ permissions:
2529

2630
concurrency:
2731
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
28-
cancel-in-progress: true
32+
# Don't cancel in-progress jobs for main/release branches.
33+
cancel-in-progress: ${{ !contains(github.ref, 'release/') && github.ref != 'main' }}
2934

3035
jobs:
3136
cloud-tpu-test:

.github/workflows/jax-array-api.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ jobs:
3232
submodules: 'true'
3333
path: 'array-api-tests'
3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
35+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838
- name: Install dependencies
3939
run: |
40-
python -m pip install .[ci]
41-
python -m pip install pytest-xdist -r array-api-tests/requirements.txt
40+
pip install uv
41+
uv pip install --system .[ci]
42+
uv pip install --system pytest-xdist -r array-api-tests/requirements.txt
4243
- name: Run the test suite
4344
env:
4445
ARRAY_API_TESTS_MODULE: jax.numpy

0 commit comments

Comments
 (0)