-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.6 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
on: push
name: CI
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Use Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Cached build
uses: actions/cache@v2
with:
path: .venv
key: ${{ runner.os }}-venv-3_10
- uses: actions/checkout@v4
with:
repository: pytorch/executorch
path: executorch
submodules: recursive
- name: Cached build
uses: actions/cache@v2
with:
path: executorch/cmake-out
key: ${{ runner.os }}-cmake-${{ hashFiles('executorch/CMakeLists.txt') }}
- name: Build executorch
run: |
python -m venv .venv
source .venv/bin/activate
cd executorch
pip install tomli zstd setuptools wheel
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
./install_requirements.sh
cmake \
-S . \
-B cmake-out \
-DCMAKE_INSTALL_PREFIX=cmake-out \
-DEXECUTORCH_BUILD_XNNPACK=ON \
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON
cmake --build cmake-out --target install --config Release
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build --CDCMAKE_PREFIX_PATH=$(realpath executorch/cmake-out) --CDEXECUTORCH_SRC_ROOT=$(realpath executorch)
- name: Run tests
run: yarn test