Skip to content

Commit 0405669

Browse files
committed
use inputs to define matrix
1 parent 063255a commit 0405669

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

.github/workflows/build_artifacts_matrix_debug.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ on:
1616
- 'no'
1717
workflow_call:
1818
inputs:
19+
runner:
20+
description: "Which runner should the workflow run on?"
21+
type: string
22+
required: true
23+
default: "linux-x86-n2-16"
24+
artifact:
25+
description: "Which JAX artifact to build?"
26+
type: string
27+
required: true
28+
default: "jaxlib"
29+
python-version:
30+
description: "Which python version should the artifact be built for?"
31+
type: string
32+
required: true
33+
default: "3.12"
1934
clone_main_xla:
2035
description: "Should latest XLA be used? (1 to enable, 0 to disable)"
2136
type: string
@@ -33,37 +48,15 @@ on:
3348
type: string
3449

3550
jobs:
36-
determine_matrix:
37-
runs-on: "linux-x86-n2-16"
38-
container: "us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest"
39-
outputs:
40-
artifact_matrix: ${{ steps.set-matrix.outputs.artifact_matrix }}
41-
python_matrix: ${{ steps.set-matrix.outputs.python_matrix }}
42-
platform_matrix: ${{ steps.set-matrix.outputs.platform_matrix }}
43-
defaults:
44-
run:
45-
shell: bash
46-
steps:
47-
# Halt for testing
48-
- name: Wait For Connection
49-
uses: google-ml-infra/actions/ci_connection@main
50-
with:
51-
halt-dispatch-input: ${{ inputs.halt-for-connection }}
52-
- name: "Determine the matrix"
53-
id: set-matrix
54-
run: |
55-
echo ${{ matrix.workflow_call_runner }}
56-
5751
build_artifacts:
58-
needs: determine_matrix
5952
defaults:
6053
run:
6154
# Explicitly set the shell to bash to override the default Windows environment, i.e, cmd.
6255
shell: bash
6356
strategy:
6457
fail-fast: false # don't cancel all jobs on failure
6558
matrix:
66-
runner: ${{ fromJSON(needs.determine_matrix.outputs.platform_matrix) }}
59+
runner: ${{ }}
6760
artifact: ${{ fromJSON(needs.determine_matrix.outputs.artifact_matrix) }}
6861
python: ${{ fromJSON(needs.determine_matrix.outputs.python_matrix) }}
6962
exclude:
@@ -73,7 +66,7 @@ jobs:
7366
- runner: "windows-x86-n2-16"
7467
artifact: "jax-cuda-plugin"
7568

76-
runs-on: ${{ matrix.runner }}
69+
runs-on: ${{ inputs.runner }}
7770

7871
container: ${{ (contains(matrix.runner, 'linux-x86') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest') ||
7972
(contains(matrix.runner, 'linux-arm64') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-arm64:latest') ||

.github/workflows/pytest_cpu_matrix_debug.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,18 @@ jobs:
2525
strategy:
2626
fail-fast: false # don't cancel all jobs on failure
2727
matrix:
28-
workflow_call_runner: ["linux-x86-n2-64", "linux-arm64-c4a-64", "windows-x86-n2-64"]
29-
python: ["3.10", "3.11", "3.12",]
28+
runner: ["linux-x86-n2-16", "linux-arm64-c4a-64", "windows-x86-n2-16"]
29+
artifact: ["jaxlib"]
30+
python: ["3.10", "3.11", "3.12", "3.13"]
31+
exclude:
32+
# Windows doesn't support CUDA artifacts
33+
- runner: "windows-x86-n2-16"
34+
artifact: "jax-cuda-pjrt"
35+
- runner: "windows-x86-n2-16"
36+
artifact: "jax-cuda-plugin"
3037
with:
38+
runner: ${{ matrix.runner }}
39+
python: ${{ matrix.python }}
3140
clone_main_xla: 1
3241
upload_artifacts: true
3342
upload_destination_prefix: '${{ github.workflow }}/${{ github.run_number }}/${{ github.run_attempt }}'
@@ -43,7 +52,7 @@ jobs:
4352
fail-fast: false # don't cancel all jobs on failure
4453
matrix:
4554
runner: ["linux-x86-n2-64", "linux-arm64-c4a-64", "windows-x86-n2-64"]
46-
python: ["3.10", "3.11", "3.12",]
55+
python: ["3.10", "3.11", "3.12", "3.13"]
4756

4857
runs-on: ${{ matrix.runner }}
4958
container: ${{ (contains(matrix.runner, 'linux-x86') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest') ||

0 commit comments

Comments
 (0)