@@ -15,11 +15,17 @@ REPORT_FILE="$ARTIFACT_DIR/test-report-$FLOW-$SUITE.json"
1515echo " Running backend test job for suite $SUITE , flow $FLOW ."
1616echo " Saving job artifacts to $ARTIFACT_DIR ."
1717
18- # The generic Linux job chooses to use base env, not the one setup by the image
1918eval " $( conda shell.bash hook) "
2019CONDA_ENV=$( conda env list --json | jq -r " .envs | .[-1]" )
2120conda activate " ${CONDA_ENV} "
2221
22+ if [[ " $( uname) " == " Darwin" ]]; then
23+ ${CONDA_RUN} --no-capture-output pip install awscli==1.37.21
24+ IS_MACOS=1
25+ else
26+ IS_MACOS=0
27+ fi
28+
2329export PYTHON_EXECUTABLE=python
2430
2531# CMake options to use, in addition to the defaults.
@@ -50,11 +56,14 @@ if [[ "$FLOW" == *arm* ]]; then
5056 .ci/scripts/setup-arm-baremetal-tools.sh
5157fi
5258
53- # We need the runner to test the built library.
54- PYTHON_EXECUTABLE=python CMAKE_ARGS=" $EXTRA_BUILD_ARGS " .ci/scripts/setup-linux.sh --build-tool cmake --build-mode Release --editable true
59+ if [[ $IS_MACOS -eq 1 ]]; then
60+ $SETUP_SCRIPT =.ci/scripts/setup-macos.sh
61+ else ;
62+ $SETUP_SCRIPT =.ci/scripts/setup-linux.sh
63+ fi
64+ ${CONDA_RUN} --no-capture-output CMAKE_ARGS=" $EXTRA_BUILD_ARGS " $SETUP_SCRIPT --build-tool cmake --build-mode Release --editable true
5565
5666EXIT_CODE=0
57- pytest -c /dev/nul -n auto backends/test/suite/$SUITE / -m flow_$FLOW --json-report --json-report-file=" $REPORT_FILE " || EXIT_CODE=$?
58-
67+ ${CONDA_RUN} --no-capture-output pytest -c /dev/nul -n auto backends/test/suite/$SUITE / -m flow_$FLOW --json-report --json-report-file=" $REPORT_FILE " || EXIT_CODE=$?
5968# Generate markdown summary.
60- python -m executorch.backends.test.suite.generate_markdown_summary_json " $REPORT_FILE " > ${GITHUB_STEP_SUMMARY:- " step_summary.md" } --exit-code $EXIT_CODE
69+ ${CONDA_RUN} --no-capture-output python -m executorch.backends.test.suite.generate_markdown_summary_json " $REPORT_FILE " > ${GITHUB_STEP_SUMMARY:- " step_summary.md" } --exit-code $EXIT_CODE
0 commit comments