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 6666 # avoid permission issue
6767 sudo chown -R "${USER}" /opt/android
6868
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+
6979 - name : Gradle cache
7080 uses : gradle/actions/setup-gradle@v3
7181
Original file line number Diff line number Diff line change 9999 submodules : ' true'
100100 ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
101101 timeout : 900
102+ upload-artifact : android-models
103+ upload-artifact-to-s3 : true
102104 script : |
103105 # The generic Linux job chooses to use base env, not the one setup by the image
104106 CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
@@ -107,13 +109,15 @@ jobs:
107109 DTYPE=${{ matrix.dtype }}
108110 BUILD_TOOL="cmake"
109111 MODE=${{ matrix.mode }}
112+ ARTIFACTS_DIR_NAME="artifacts-to-be-uploaded/${DTYPE}-${MODE}"
113+ ARTIFACTS_DIR_NAME="${ARTIFACTS_DIR_NAME/+/-}"
110114
111115 # Setup executorch
112116 PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "${BUILD_TOOL}"
113117 # Install requirements for export_llama
114118 PYTHON_EXECUTABLE=python bash examples/models/llama/install_requirements.sh
115119 # 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}"
117121
118122 test-llama-runner-linux-android :
119123 name : test-llama-runner-linux-android
@@ -320,6 +324,7 @@ jobs:
320324
321325 android :
322326 uses : ./.github/workflows/_android.yml
327+ needs : test-llama-runner-linux
323328
324329 unittest :
325330 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
1818echo " List all running emulators"
1919$ADB_PATH devices
2020
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