Skip to content

Commit 019585b

Browse files
committed
[Backend Tester] Run Core ML tests in nightly CI
ghstack-source-id: b6fb978 ghstack-comment-id: 3190288611 Pull-Request: #13446
1 parent 64b31a4 commit 019585b

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.ci/scripts/test_backend_macos.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
set -eux
8+
9+
SUITE=$1
10+
FLOW=$2
11+
ARTIFACT_DIR=$3
12+
13+
echo "Running backend test job for suite $SUITE, flow $FLOW."
14+
echo "Saving job artifacts to $ARTIFACT_DIR."
15+
16+
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
17+
18+
bash .ci/scripts/setup-conda.sh
19+
eval "$(conda shell.bash hook)"
20+
21+
PYTHON_EXECUTABLE=python
22+
${CONDA_RUN} --no-capture-output .ci/scripts/setup-macos.sh --build-tool cmake --build-mode Release
23+
24+
${CONDA_RUN} --no-capture-output python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"

.github/workflows/nightly.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,30 @@ jobs:
5858
EXIT_CODE=0
5959
.ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
6060
echo "Test run complete with exit code $EXIT_CODE."
61+
62+
backend-test-macos:
63+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
64+
permissions:
65+
id-token: write
66+
contents: read
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
flow: [coreml, coreml_static_int8]
71+
suite: [models, operators]
72+
with:
73+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
74+
runner: macos-m1-stable
75+
python-version: 3.12
76+
submodules: recursive
77+
timeout: 120
78+
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
79+
script: |
80+
set -eux
81+
82+
# This is needed to get the prebuilt PyTorch wheel from S3
83+
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
84+
85+
EXIT_CODE=0
86+
.ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
87+
echo "Test run complete with exit code $EXIT_CODE."

0 commit comments

Comments
 (0)