refactor: use neon-rs to create binding (#1) #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
name: CI | |
jobs: | |
build: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Use Rust | |
uses: raftario/setup-rust-action@v1 | |
with: | |
rust-channel: nightly | |
rust-host: x86_64-unknown-linux-gnu | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Use Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Cached pip | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-venv-3_10 | |
- name: Cached build | |
uses: actions/cache@v2 | |
with: | |
path: executorch/cmake-out | |
key: ${{ runner.os }}-cmake-${{ hashFiles('executorch/{kernels,extension,backends,runtime}/**/*.cpp') }} | |
- 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 | |
if [ ! -d cmake-out ]; then | |
./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 | |
fi | |
- name: Install dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Run tests | |
run: yarn test-all |