Skip to content

Commit 6b7720f

Browse files
committed
Make the resuable pytest cpu workflow as default
1 parent aa01d86 commit 6b7720f

File tree

2 files changed

+28
-85
lines changed

2 files changed

+28
-85
lines changed

.github/workflows/pytest_cpu.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Run Pytest CPU tests
22

33
on:
4-
# pull_request:
5-
# branches:
6-
# - main
4+
pull_request:
5+
branches:
6+
- main
77
workflow_dispatch:
88
inputs:
99
halt-for-connection:
@@ -13,27 +13,37 @@ on:
1313
default: 'no'
1414
options:
1515
- 'yes'
16-
- 'no'
1716

1817
jobs:
19-
build:
18+
build_jaxlib_artifact:
19+
name: "Build the jaxlib aritfact using latest XLA"
20+
uses: ./.github/workflows/build_artifacts.yml
21+
with:
22+
wheel_list: "jaxlib"
23+
python_list: "3.10"
24+
platform_list: "linux_x86,linux_arm64"
25+
clone_main_xla: 1
26+
upload_artifacts: true
27+
upload_destination: '${{ github.workflow }}/${{ github.run_number }}/${{ github.run_attempt }}'
28+
29+
run_pytest:
30+
name: "Run CPU tests with Pytest"
31+
needs: build_jaxlib_artifact
2032
continue-on-error: true
2133
defaults:
2234
run:
2335
# Explicitly set the shell to bash to override the default Windows environment, i.e, cmd.
2436
shell: bash
2537
strategy:
2638
matrix:
27-
runner: ["windows-x86-n2-64", "linux-x86-n2-64", "linux-arm64-t2a-48"]
39+
runner: ["linux-x86-n2-64", "linux-arm64-t2a-48"]
2840
python: ["3.10"]
2941

3042
runs-on: ${{ matrix.runner }}
3143
container: ${{ (contains(matrix.runner, 'linux-x86') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build:latest') ||
32-
(contains(matrix.runner, 'linux-arm64') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-arm64:latest') ||
33-
(contains(matrix.runner, 'windows-x86') && null) }}
44+
(contains(matrix.runner, 'linux-arm64') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-arm64:latest') }}
3445

3546
env:
36-
JAXCI_CLONE_MAIN_XLA: 1
3747
JAXCI_HERMETIC_PYTHON_VERSION: ${{ matrix.python }}
3848

3949
steps:
@@ -43,8 +53,15 @@ jobs:
4353
uses: google-ml-infra/actions/ci_connection@main
4454
with:
4555
halt-dispatch-input: ${{ inputs.halt-for-connection }}
46-
- name: Build jaxlib
47-
run: ./ci/build_artifacts.sh "jaxlib"
56+
- name: Set Platform
57+
run: |
58+
os=$(uname -s | awk '{print tolower($0)}')
59+
arch=$(uname -m)
60+
echo "PLATFORM=${os}_${arch}" >> $GITHUB_ENV
61+
- name: Download the artifacts built in the "build_artifacts" job
62+
run: >-
63+
mkdir -p $(pwd)/dist &&
64+
gsutil -m cp -r gs://general-ml-ci-transient/jax-github-actions/"${{ github.workflow }}"/${{ github.run_number }}/${{ github.run_attempt }}/$PLATFORM/python${JAXCI_HERMETIC_PYTHON_VERSION} $(pwd)/dist/
4865
- name: Install pytest
4966
env:
5067
JAXCI_PYTHON: python${{ matrix.python }}

.github/workflows/pytest_cpu_reuse.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)