File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed
Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : android-tests
2+
3+ on :
4+ push :
5+ tags :
6+ # Trigger on release candidate builds
7+ # Release candidate tags look like: v1.11.0-rc1
8+ - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
9+ - ' ciflow/trunk/*'
10+ - ' ciflow/android/*'
11+ branches :
12+ - master
13+ - main
14+ - release/*
15+ workflow_dispatch :
16+
17+ concurrency :
18+ group : run-android-tests-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
19+ cancel-in-progress : true
20+
21+ defaults :
22+ run :
23+ shell : bash -e -l {0}
24+
25+ jobs :
26+
27+ build-and-test :
28+ runs-on : ubuntu-latest
29+ env :
30+ JOB_BASE_NAME : ubuntu-latest-android-tests
31+ steps :
32+ - name : Setup miniconda
33+ uses : conda-incubator/setup-miniconda@v2
34+ with :
35+ auto-update-conda : true
36+ python-version : 3.8
37+ activate-environment : build
38+
39+ - name : Install dependencies
40+ run : |
41+ conda install -y \
42+ cffi \
43+ cmake \
44+ mkl \
45+ mkl-include \
46+ ninja \
47+ numpy \
48+ pyyaml \
49+ requests \
50+ setuptools \
51+ typing_extensions
52+
53+ - name : Checkout PyTorch
54+ uses : zhouzhuojie/checkout@05b13c9a0d21f08f6d5e64a1d5042246d13619d9
55+ with :
56+ ref : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
57+ fetch-depth : 0
58+ submodules : recursive
59+
60+ - name : Build PyTorch Android
61+ run : |
62+ export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle"
63+ echo "CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname "$(which conda)")/../"}" >> "${GITHUB_ENV}"
64+ ./scripts/build_pytorch_android.sh x86
65+
66+ - name : Run tests
67+ uses : reactivecircus/android-emulator-runner@v2
68+ with :
69+ api-level : 25
70+ script : ./android/run_tests.sh
You can’t perform that action at this time.
0 commit comments