File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 66
66
# avoid permission issue
67
67
sudo chown -R "${USER}" /opt/android
68
68
69
+ - name : Download Artifacts
70
+ shell : bash
71
+ run : |
72
+ set -eux
73
+ curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug.apk
74
+ curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/llm_demo/app-debug-androidTest.apk
75
+ curl -O https://gha-artifacts.s3.amazonaws.com/${{ github.repository }}/${{ github.run_id }}/artifacts/fp32-xnnpack-custom/model.zip
76
+ unzip model.zip
77
+ mv *.pte model.pte
78
+
69
79
- name : Gradle cache
70
80
uses : gradle/actions/setup-gradle@v3
71
81
Original file line number Diff line number Diff line change 99
99
submodules : ' true'
100
100
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
101
101
timeout : 900
102
+ upload-artifact : android-models
103
+ upload-artifact-to-s3 : true
102
104
script : |
103
105
# The generic Linux job chooses to use base env, not the one setup by the image
104
106
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
@@ -107,13 +109,15 @@ jobs:
107
109
DTYPE=${{ matrix.dtype }}
108
110
BUILD_TOOL="cmake"
109
111
MODE=${{ matrix.mode }}
112
+ ARTIFACTS_DIR_NAME="artifacts-to-be-uploaded/${DTYPE}-${MODE}"
113
+ ARTIFACTS_DIR_NAME="${ARTIFACTS_DIR_NAME/+/-}"
110
114
111
115
# Setup executorch
112
116
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "${BUILD_TOOL}"
113
117
# Install requirements for export_llama
114
118
PYTHON_EXECUTABLE=python bash examples/models/llama/install_requirements.sh
115
119
# Test llama2
116
- PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh stories110M "${BUILD_TOOL}" "${DTYPE}" "${MODE}"
120
+ PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh stories110M "${BUILD_TOOL}" "${DTYPE}" "${MODE}" "${ARTIFACTS_DIR_NAME}"
117
121
118
122
test-llama-runner-linux-android :
119
123
name : test-llama-runner-linux-android
@@ -320,6 +324,7 @@ jobs:
320
324
321
325
android :
322
326
uses : ./.github/workflows/_android.yml
327
+ needs : test-llama-runner-linux
323
328
324
329
unittest :
325
330
uses : ./.github/workflows/_unittest.yml
Original file line number Diff line number Diff line change @@ -18,5 +18,10 @@ $ADB_PATH wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; d
18
18
echo " List all running emulators"
19
19
$ADB_PATH devices
20
20
21
- # TODO: Run tests on emulator here, atm the script only boots up the emulator
22
- # and exits without doing anything yet
21
+ adb install -t app-debug.apk
22
+ adb install -t app-debug-androidTest.apk
23
+
24
+ adb shell mkdir -p /data/local/tmp/llama
25
+ adb push model.pte /data/local/tmp/llama
26
+ adb push tokenizer.bin /data/local/tmp/llama
27
+ adb shell am instrument -w -r com.example.executorchllamademo.test/androidx.test.runner.AndroidJUnitRunner
You can’t perform that action at this time.
0 commit comments