Skip to content

Turn off custom and optimized kernels for mac x64 #67

Turn off custom and optimized kernels for mac x64

Turn off custom and optimized kernels for mac x64 #67

Workflow file for this run

name: build
on: push
jobs:
build:
runs-on: >-
${{
(matrix.os == 'mac' && matrix.arch == 'arm64') &&
'macos-15' ||
(fromJson('{"linux":"ubuntu-24.04","mac":"macos-13","win":"windows-2022"}')[matrix.os])
}}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os: [linux, mac]
arch: [arm64, x64]
backend: [all, cpu, mps, xnnpack]
exclude:
- os: linux
arch: arm64
- os: linux
backend: mps
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- id: backend
name: Backend name
uses: ASzc/change-string-case-action@v6
with:
string: ${{ matrix.backend }}
- name: Debug Build
run: |
yarn
yarn build \
--debug \
--parallel 4 \
--CDTORCH_BACKEND_${{ steps.backend.outputs.uppercase }}=ON
cp build/Debug/executorch.node executorch-${{ matrix.backend }}-${{ matrix.os }}-${{ matrix.arch }}-debug.node
- name: Test
id: test
run: yarn test
- name: Get Stack Trace
run: |
yarn tsc --project tests/tsconfig.json
lldb -b -o run -k 'thread backtrace all' node dist/run.js
if: failure() && matrix.os != 'win' && steps.test.outcome == 'failure'
- name: Release build
run: |
rm -rf build
yarn build \
--parallel 4 \
--CDTORCH_BACKEND_${{ steps.backend.outputs.uppercase }}=ON
cp build/Release/executorch.node executorch-${{ matrix.backend }}-${{ matrix.os }}-${{ matrix.arch }}-release.node
- name: Upload Binary Files
uses: actions/upload-artifact@v4
with:
name: executorch-${{ matrix.backend }}-${{ matrix.os }}-${{ matrix.arch }}
path: executorch-*.node
retention-days: 1
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
# Needed by action-gh-release.
contents: write
steps:
- name: Download Files
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Compress files
run: gzip *
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
name: ExecuTorch.js ${{ github.ref_name }}
body: '## Changelog'
files: '*.gz'