10
10
- .ci/docker/**
11
11
- .github/workflows/android.yml
12
12
- install_requirements.sh
13
- - examples/demo-apps/**
13
+ - examples/demo-apps/android/**
14
+ - extension/android/**
14
15
- extension/module/**
15
16
workflow_dispatch :
16
17
@@ -21,7 +22,7 @@ concurrency:
21
22
jobs :
22
23
test-demo-android :
23
24
name : test-demo-android
24
- uses : pytorch/test-infra/.github/workflows/linux_job.yml@release/2.3
25
+ uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
25
26
strategy :
26
27
matrix :
27
28
include :
33
34
submodules : ' true'
34
35
ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
35
36
timeout : 90
37
+ upload-artifact : android-apps
36
38
script : |
37
39
set -eux
38
40
45
47
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "${BUILD_TOOL}"
46
48
# Build Android demo app
47
49
bash build/test_android_ci.sh
50
+
51
+ mkdir -p artifacts-to-be-uploaded
52
+ mkdir -p artifacts-to-be-uploaded/arm64-v8a/
53
+ mkdir -p artifacts-to-be-uploaded/x86_64/
54
+ # Copy the jar to S3
55
+ cp extension/android/build/libs/executorch.jar artifacts-to-be-uploaded/
56
+ # Copy the app and its test suite to S3
57
+ cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/debug/*.apk artifacts-to-be-uploaded/
58
+ cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/androidTest/debug/*.apk artifacts-to-be-uploaded/
59
+ # Also copy the libraries
60
+ cp cmake-out-android-arm64-v8a/lib/*.a artifacts-to-be-uploaded/arm64-v8a/
61
+ cp cmake-out-android-arm64-v8a/extension/android/*.so artifacts-to-be-uploaded/arm64-v8a/
62
+ cp cmake-out-android-x86_64/lib/*.a artifacts-to-be-uploaded/x86_64/
63
+ cp cmake-out-android-x86_64/extension/android/*.so artifacts-to-be-uploaded/x86_64/
64
+
65
+ # Upload the app and its test suite to S3 so that they can be downloaded by the test job
66
+ upload-artifacts :
67
+ needs : test-demo-android
68
+ runs-on : linux.2xlarge
69
+ steps :
70
+ - name : Download the artifacts
71
+ uses : actions/download-artifact@v3
72
+ with :
73
+ # The name here needs to match the name of the upload-artifact parameter
74
+ name : android-apps
75
+ path : ${{ runner.temp }}/artifacts/
76
+
77
+ - name : Verify the artifacts
78
+ shell : bash
79
+ working-directory : ${{ runner.temp }}/artifacts/
80
+ run : |
81
+ ls -lah ./
82
+
83
+ - name : Upload the artifacts to S3
84
+ uses : seemethere/upload-artifact-s3@v5
85
+ with :
86
+ s3-bucket : gha-artifacts
87
+ s3-prefix : |
88
+ ${{ github.repository }}/${{ github.run_id }}/artifact
89
+ retention-days : 14
90
+ if-no-files-found : ignore
91
+ path : ${{ runner.temp }}/artifacts/
0 commit comments