Skip to content

Commit 9dce492

Browse files
authored
[build Folder Migration] Move core build files into scripts (#9434)
### Summary The final diff as part of #9117. This is the big one that affects users — we finally move the core build scripts into `scripts/` ### Test plan CI cc @larryliu0820 @lucylq
1 parent 7063c26 commit 9dce492

26 files changed

+31
-36
lines changed

.github/workflows/_android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
# Build LLM Demo for Android
3636
export BUILD_AAR_DIR=aar-out
3737
mkdir -p $BUILD_AAR_DIR
38-
bash build/build_android_library.sh ${ARTIFACTS_DIR_NAME}
38+
bash scripts/build_android_library.sh ${ARTIFACTS_DIR_NAME}
3939
bash .ci/scripts/build_android_instrumentation.sh ${ARTIFACTS_DIR_NAME}
4040
4141
mkdir -p examples/demo-apps/android/LlamaDemo/app/libs
@@ -120,7 +120,7 @@ jobs:
120120
with:
121121
api-level: ${{ env.API_LEVEL }}
122122
arch: x86_64
123-
script: ./build/run_android_emulator.sh
123+
script: ./scripts/run_android_emulator.sh
124124
# NB: This is to boot the emulator faster following the instructions on
125125
# https://github.com/ReactiveCircus/android-emulator-runner. The max number
126126
# of cores we can set is 6, any higher number will be reduced to 6.

.github/workflows/android-perf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ jobs:
363363
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
364364
365365
mkdir -p aar-out
366-
PYTHON_EXECUTABLE=python ANDROID_ABIS="arm64-v8a" BUILD_AAR_DIR=aar-out EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029 bash build/build_android_library.sh
366+
PYTHON_EXECUTABLE=python ANDROID_ABIS="arm64-v8a" BUILD_AAR_DIR=aar-out EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029 bash scripts/build_android_library.sh
367367
mkdir -p extension/benchmark/android/benchmark/app/libs
368368
cp aar-out/executorch.aar extension/benchmark/android/benchmark/app/libs
369369
pushd extension/benchmark/android/benchmark

.github/workflows/android-release-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# Build AAR Package
5656
mkdir aar-out
5757
export BUILD_AAR_DIR=aar-out
58-
bash build/build_android_library.sh
58+
bash scripts/build_android_library.sh
5959
mkdir -p "${ARTIFACTS_DIR_NAME}"
6060
cp aar-out/executorch.aar "${ARTIFACTS_DIR_NAME}/executorch.aar"
6161

.github/workflows/apple-perf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ jobs:
387387
388388
echo "::group::Build ExecuTorch iOS frameworks"
389389
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
390-
build/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
390+
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
391391
echo "::endgroup::"
392392
393393
# NB: Although exported models can be copied to this directory and bundled together with the
@@ -396,7 +396,7 @@ jobs:
396396
# create the directory here to pass the build
397397
mkdir -p extension/benchmark/apple/Benchmark/Models
398398
${CONDA_RUN} --no-capture-output \
399-
build/build_apple_llm_demo.sh ${ARTIFACTS_DIR_NAME}
399+
scripts/build_apple_llm_demo.sh ${ARTIFACTS_DIR_NAME}
400400
401401
upload-benchmark-app:
402402
needs: build-benchmark-app

.github/workflows/apple.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ on:
1111
- .github/workflows/apple.yml
1212
- install_executorch.sh
1313
- backends/apple/**
14-
- build/build_apple_frameworks.sh
15-
- build/build_apple_llm_demo.sh
16-
- build/create_frameworks.sh
14+
- scripts/build_apple_frameworks.sh
15+
- scripts/build_apple_llm_demo.sh
16+
- scripts/create_frameworks.sh
1717
- .ci/scripts/test_ios_ci.sh
1818
- examples/demo-apps/apple_ios/**
1919
- extension/apple/**
@@ -172,7 +172,7 @@ jobs:
172172
173173
# Build iOS Frameworks
174174
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
175-
build/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
175+
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
176176
177177
# Bundle iOS Frameworks
178178
for FRAMEWORK in "${FRAMEWORKS[@]}"; do (
@@ -313,11 +313,11 @@ jobs:
313313
314314
echo "::group::Build ExecuTorch iOS frameworks"
315315
PYTHON_EXECUTABLE=python ${CONDA_RUN} --no-capture-output \
316-
build/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
316+
scripts/build_apple_frameworks.sh --Release --Debug --coreml --custom --mps --optimized --portable --quantized --xnnpack
317317
echo "::endgroup::"
318318
319319
echo "::group::Build ExecuTorch benchmark app"
320320
mkdir -p extension/benchmark/apple/Benchmark/Models
321321
${CONDA_RUN} --no-capture-output \
322-
build/build_apple_llm_demo.sh "${ARTIFACTS_DIR_NAME}"
322+
scripts/build_apple_llm_demo.sh "${ARTIFACTS_DIR_NAME}"
323323
echo "::endgroup::"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ __pycache__/
1111
arm_test/
1212
buck-out/
1313
buck2-bin/
14+
build/
1415
cmake-android-out/
1516
cmake-ios-out/
1617
cmake-out*

backends/apple/coreml/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ xcode-select --install
5050

5151
```bash
5252
cd executorch
53-
./build/build_apple_frameworks.sh --coreml
53+
./scripts/build_apple_frameworks.sh --coreml
5454
```
5555
5. Open the project in Xcode, and drag `executorch.xcframework` and `coreml_backend.xcframework` frameworks generated from Step 2 to Frameworks.
5656

backends/apple/mps/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ python3 -m sdk.inspector.inspector_cli --etdump_path etdump.etdp --etrecord_path
130130
***Step 1***. Create the ExecuTorch core and MPS delegate frameworks to link on iOS
131131
```bash
132132
cd executorch
133-
./build/build_apple_frameworks.sh --mps
133+
./scripts/build_apple_frameworks.sh --mps
134134
```
135135

136136
`mps_delegate.xcframework` will be in `cmake-out` folder, along with `executorch.xcframework` and `portable_delegate.xcframework`:

build/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/source/backends-mps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ python3 -m sdk.inspector.inspector_cli --etdump_path etdump.etdp --etrecord_path
130130
***Step 1***. Create the ExecuTorch core and MPS delegate frameworks to link on iOS
131131
```bash
132132
cd executorch
133-
./build/build_apple_frameworks.sh --mps
133+
./scripts/build_apple_frameworks.sh --mps
134134
```
135135

136136
`mps_delegate.xcframework` will be in `cmake-out` folder, along with `executorch.xcframework` and `portable_delegate.xcframework`:

0 commit comments

Comments
 (0)