Skip to content

Commit 5dd235a

Browse files
Copilotkirklandsign
andcommitted
Add model file download and push to emulator for instrumentation tests
Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
1 parent 36ba42d commit 5dd235a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/android-build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ jobs:
107107
working-directory: ${{ matrix.path }}
108108
script: echo "Generated AVD snapshot for caching."
109109

110+
- name: Download model files
111+
run: |
112+
set -e
113+
mkdir -p model_files
114+
curl -fL -o model_files/model.pte "https://huggingface.co/pytorch/SmolLM3-3B-INT8-INT4/resolve/main/model.pte"
115+
curl -fL -o model_files/tokenizer.json "https://huggingface.co/pytorch/SmolLM3-3B-INT8-INT4/resolve/main/tokenizer.json"
116+
110117
- name: Run instrumentation tests
111118
uses: reactivecircus/android-emulator-runner@v2
112119
with:
@@ -116,4 +123,9 @@ jobs:
116123
emulator-options: -no-snapshot-save ${{ env.EMULATOR_OPTIONS }}
117124
disable-animations: true
118125
working-directory: ${{ matrix.path }}
119-
script: ./gradlew connectedCheck
126+
script: |
127+
set -e
128+
adb shell mkdir -p /data/local/tmp/llama
129+
adb push $GITHUB_WORKSPACE/model_files/model.pte /data/local/tmp/llama/
130+
adb push $GITHUB_WORKSPACE/model_files/tokenizer.json /data/local/tmp/llama/
131+
./gradlew connectedCheck

0 commit comments

Comments
 (0)