-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: #2413 bypass-github-export-checks Reviewed By: huydhn Differential Revision: D54791338 fbshipit-source-id: b89842e7689b5338b1b82f3c6cba2c809408fbe0
- Loading branch information
1 parent
e98a7e0
commit 94517f0
Showing
3 changed files
with
94 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Apple | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
pull_request: | ||
paths: | ||
- .ci/docker/** | ||
- .github/workflows/app-build.yml | ||
- install_requirements.sh | ||
- backends/apple/** | ||
- build/build_apple_frameworks.sh | ||
- build/create_frameworks.sh | ||
- build/test_ios_ci.sh | ||
- examples/demo-apps/** | ||
- extension/apple/** | ||
- extension/module/** | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test-demo-ios: | ||
name: test-demo-ios | ||
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main | ||
with: | ||
runner: macos-latest-xlarge | ||
python-version: '3.11' | ||
submodules: 'true' | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
timeout: 90 | ||
script: | | ||
WORKSPACE=$(pwd) | ||
pushd "${WORKSPACE}/pytorch/executorch" | ||
BUILD_TOOL=cmake | ||
.ci/scripts/setup-conda.sh | ||
# Setup MacOS dependencies as there is no Docker support on MacOS atm | ||
GITHUB_RUNNER=1 PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
.ci/scripts/setup-macos.sh "${BUILD_TOOL}" | ||
# Build and test iOS Demo App | ||
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
build/test_ios_ci.sh | ||
popd | ||
build-frameworks-ios: | ||
name: build-frameworks-ios | ||
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main | ||
with: | ||
runner: macos-latest-xlarge | ||
python-version: '3.11' | ||
submodules: 'true' | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | ||
upload-artifact: executorch.zip | ||
timeout: 90 | ||
script: | | ||
WORKSPACE=$(pwd) | ||
pushd "${WORKSPACE}/pytorch/executorch" | ||
BUILD_TOOL=cmake | ||
VERSION="0.1.0" | ||
OUTPUT="executorch-${VERSION}" | ||
.ci/scripts/setup-conda.sh | ||
# Setup MacOS dependencies as there is no Docker support on MacOS atm | ||
GITHUB_RUNNER=1 PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
.ci/scripts/setup-macos.sh "${BUILD_TOOL}" | ||
# Install CoreML Backend Requirements | ||
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
backends/apple/coreml/scripts/install_requirements.sh | ||
# Install MPS Backend Requirements | ||
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
backends/apple/mps/install_requirements.sh | ||
# Build iOS Frameworks | ||
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \ | ||
build/build_apple_frameworks.sh --output="${OUTPUT}" --coreml --mps --portable --xnnpack | ||
# Bundle iOS Frameworks | ||
cp LICENSE "${OUTPUT}" | ||
zip -r "${RUNNER_TEMP}/artifacts/${OUTPUT}.zip" "${OUTPUT}" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters