@@ -240,11 +240,11 @@ jobs:
240240
241241 cxx_flags="-fno-exceptions -fno-rtti -Wall -Werror -Wno-int-in-bool-context -DET_HAVE_PREAD=0"
242242 setup_script_args=""
243- if [[ ${{ matrix.os}} == "bare_metal" ]]; then
243+ if [[ ${{ matrix.os}} == "bare_metal" ]]; then
244244 toolchain_prefix=arm-none-eabi-
245245 threshold="103268" # ~100KiB
246246 toolchain_cmake=examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
247- elif [[ ${{ matrix.os}} == "zephyr-preset" ]]; then
247+ elif [[ ${{ matrix.os}} == "zephyr-preset" ]]; then
248248 setup_script_args="--target-toolchain zephyr"
249249 toolchain_prefix=arm-zephyr-eabi-
250250 threshold="133120" # should be ~125KB, set threshold to 130KB
@@ -600,6 +600,45 @@ jobs:
600600 echo "::endgroup::"
601601 done
602602
603+ test-coreml-optimum-executorch :
604+ name : test-apple-model
605+ uses : pytorch/test-infra/.github/workflows/macos_job.yml@main
606+ strategy :
607+ fail-fast : false
608+ with :
609+ runner : macos-m1-stable
610+ python-version : ' 3.11'
611+ submodules : ' recursive'
612+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
613+ timeout : 90
614+ script : |
615+ BUILD_TOOL=cmake
616+ bash .ci/scripts/setup-conda.sh
617+
618+ # Setup MacOS dependencies as there is no Docker support on MacOS atm
619+ PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
620+
621+ echo "::group::Set up Hugging Face"
622+ pip install -U "huggingface_hub[cli]"
623+ huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
624+ OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
625+ git clone https://github.com/huggingface/optimum-executorch
626+ pushd optimum-executorch
627+ # There is no release yet, for CI stability, always test from the same commit on main
628+ # git checkout $OPTIMUM_ET_COMMIT
629+ gh pr checkout 93
630+ python install_dev.py --skip_override_torch
631+ popd
632+ pip list
633+ echo "::endgroup::"
634+
635+
636+ # Test model export
637+ MODELS=(smollm llama3)
638+ for MODEL_NAME in "${MODELS[@]}"; do
639+ bash .ci/scripts/export_optimum_et_coreml.sh $MODEL_NAME" /tmp/$MODEL_NAME
640+
641+
603642 test-huggingface-transformers :
604643 # NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway
605644 if : ${{ !github.event.pull_request.head.repo.fork }}
0 commit comments