Skip to content

Commit 9c15ade

Browse files
committed
[Backend Tester] Run Core ML tests in nightly CI
ghstack-source-id: 2469aab ghstack-comment-id: 3190288611 Pull-Request: #13446
1 parent 7deb272 commit 9c15ade

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.ci/scripts/backend-test-macos.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
eval "$(conda shell.bash hook)"
17+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
18+
conda activate "${CONDA_ENV}"
19+
20+
PYTHON_EXECUTABLE=python .ci/scripts/setup-macos.sh --build-tool cmake --build-mode Release
21+
22+
python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"

.github/workflows/nightly.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,22 @@ jobs:
5454
script: |
5555
set -eux
5656
.ci/scripts/backend-test-linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"
57+
58+
backend-test-macos:
59+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
flow: [coreml, coreml_static_int8]
64+
suite: [models, operators]
65+
with:
66+
job-name: build
67+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
68+
runner: macos-latest-xlarge
69+
python-version: 3.12
70+
submodules: recursive
71+
timeout: 90
72+
upload-artifact: test-report
73+
script: |
74+
set -eux
75+
.ci/scripts/backend-test-macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}"

0 commit comments

Comments
 (0)