|
| 1 | +name: Run Pytest CPU tests (resuable workflow) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +jobs: |
| 9 | + build_jaxlib_artifacts: |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + runner: ["windows-x86-n2-64", "linux-x86-n2-64", "linux-arm64-t2a-48"] |
| 13 | + python: ["3.10"] |
| 14 | + exclude: |
| 15 | + # Only build the jaxlib artifact. |
| 16 | + - artifact: "jax" |
| 17 | + - artifact: "jax-cuda-plugin" |
| 18 | + - artifact: "jax-cuda-pjrt" |
| 19 | + |
| 20 | + uses: ./.github/workflows/build_artifacts.yml |
| 21 | + |
| 22 | + run_pytest: |
| 23 | + continue-on-error: true |
| 24 | + defaults: |
| 25 | + run: |
| 26 | + # Explicitly set the shell to bash to override the default Windows environment, i.e, cmd. |
| 27 | + shell: bash |
| 28 | + strategy: |
| 29 | + matrix: |
| 30 | + runner: ["windows-x86-n2-64", "linux-x86-n2-64", "linux-arm64-t2a-48"] |
| 31 | + python: ["3.10"] |
| 32 | + |
| 33 | + runs-on: ${{ matrix.runner }} |
| 34 | + container: ${{ (contains(matrix.runner, 'linux-x86') && 'gcr.io/tensorflow-testing/nosla-cuda12.3-cudnn9.1-ubuntu20.04-manylinux2014-multipython:latest') || |
| 35 | + (contains(matrix.runner, 'linux-arm64') && 'us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/linux-arm64-arc-container:latest') || |
| 36 | + (contains(matrix.runner, 'windows-x86') && null) }} |
| 37 | + |
| 38 | + env: |
| 39 | + # Disable running `run_docker_container.sh`. JAX self-hosted runners already run in a Docker |
| 40 | + # container. |
| 41 | + JAXCI_RUN_DOCKER_CONTAINER: 0 |
| 42 | + # Use RBE to build the artifacts where possible (Linux x86 and Windows). |
| 43 | + JAXCI_BUILD_ARTIFACT_WITH_RBE: 1 |
| 44 | + # Setup the test environment (disable x64 mode and clone XLA at HEAD) |
| 45 | + JAXCI_SETUP_TEST_ENVIRONMENT: 1 |
| 46 | + JAXCI_HERMETIC_PYTHON_VERSION: ${{ matrix.python }} |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v3 |
| 50 | + # Halt for testing |
| 51 | + - name: Wait For Connection |
| 52 | + uses: ./actions/ci_connection/ |
| 53 | + - name: Install pytest |
| 54 | + env: |
| 55 | + JAXCI_PYTHON: python${{ matrix.python }} |
| 56 | + run: $JAXCI_PYTHON -m pip install pytest |
| 57 | + - name: Install dependencies |
| 58 | + env: |
| 59 | + JAXCI_PYTHON: python${{ matrix.python }} |
| 60 | + run: $JAXCI_PYTHON -m pip install --upgrade numpy=="2.0.0" scipy=="1.13.1" wheel build pytest-xdist absl-py opt-einsum colorama portpicker matplotlib 'importlib_metadata>=4.6' hypothesis flatbuffers filelock |
| 61 | + - name: Run Pytest CPU tests |
| 62 | + run: ./ci/run_pytest.sh "ci/envs/run_tests/pytest_cpu" |
0 commit comments