Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 169 additions & 169 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
shell: bash
strategy:
matrix:
runner: [macos-15]
runner: [ubuntu-22.04, macos-15]
permissions:
contents: read
checks: write
Expand Down Expand Up @@ -164,178 +164,178 @@ jobs:
env:
RUSTFLAGS: "-D warnings"

# check:
# runs-on: ${{ matrix.runner }}
# defaults:
# run:
# shell: bash
# strategy:
# matrix:
# include:
# # Linux
# - target: x86_64-unknown-linux-gnu
# runner: ubuntu-24.04
# - target: aarch64-unknown-linux-gnu
# runner: ubuntu-24.04
# - target: i686-unknown-linux-gnu
# runner: ubuntu-24.04
# - target: armv7-unknown-linux-gnueabihf
# runner: ubuntu-24.04
# # macOS
# - target: aarch64-apple-darwin
# runner: macos-15
# # Android
# - target: x86_64-linux-android
# runner: ubuntu-24.04
# - target: i686-linux-android
# runner: ubuntu-24.04
# - target: aarch64-linux-android
# runner: ubuntu-24.04
# - target: armv7-linux-androideabi
# runner: ubuntu-24.04
# # iOS
# - target: aarch64-apple-ios
# runner: macos-15
# # - target: x86_64-apple-ios
# # runner: macos-15
# permissions:
# contents: read
# checks: write
# steps:
# - name: Repo checkout
# uses: actions/checkout@v7
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Rust toolchain
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: 1.77.0
# target: ${{ matrix.target }}
# components: clippy
# cache-workspaces: |
# executorch
# executorch-sys
check:
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
# Linux
- target: x86_64-unknown-linux-gnu
runner: ubuntu-24.04
- target: aarch64-unknown-linux-gnu
runner: ubuntu-24.04
- target: i686-unknown-linux-gnu
runner: ubuntu-24.04
- target: armv7-unknown-linux-gnueabihf
runner: ubuntu-24.04
# macOS
- target: aarch64-apple-darwin
runner: macos-15
# Android
- target: x86_64-linux-android
runner: ubuntu-24.04
- target: i686-linux-android
runner: ubuntu-24.04
- target: aarch64-linux-android
runner: ubuntu-24.04
- target: armv7-linux-androideabi
runner: ubuntu-24.04
# iOS
- target: aarch64-apple-ios
runner: macos-15
# - target: x86_64-apple-ios
# runner: macos-15
permissions:
contents: read
checks: write
steps:
- name: Repo checkout
uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: 1.77.0
target: ${{ matrix.target }}
components: clippy
cache-workspaces: |
executorch
executorch-sys

# - uses: cargo-bins/cargo-binstall@v1.20.1
# - name: Install cross dependencies
# run: |
# if [[ "${{ matrix.target }}" == *"android"* ]]; then
# : # Run `cargo ndk-env`, capture the environment variables it sets,
# : # and export them to GITHUB_ENV for subsequent steps.
- uses: cargo-bins/cargo-binstall@v1.20.1
- name: Install cross dependencies
run: |
if [[ "${{ matrix.target }}" == *"android"* ]]; then
: # Run `cargo ndk-env`, capture the environment variables it sets,
: # and export them to GITHUB_ENV for subsequent steps.

# sudo apt-get update
# cargo binstall cargo-ndk --force
# cargo ndk-env --target ${{ matrix.target }} > ndk-env.sh
# env | sort > env_before.txt
# source ndk-env.sh
# env | sort > env_after.txt
# comm -13 env_before.txt env_after.txt >> $GITHUB_ENV
# fi
# if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
# sudo apt-get update
# sudo apt-get install g++-aarch64-linux-gnu
# echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
# echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
# echo "AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar" >> $GITHUB_ENV
# fi
# if [[ "${{ matrix.target }}" == "armv7-unknown-linux-gnueabihf" ]]; then
# sudo apt-get update
# sudo apt-get install g++-arm-linux-gnueabihf
# echo "CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
# echo "CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++" >> $GITHUB_ENV
# echo "AR_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar" >> $GITHUB_ENV
# fi
# if [[ "${{ matrix.target }}" == "i686-unknown-linux-gnu" ]]; then
# sudo apt-get update
# sudo apt-get install g++-i686-linux-gnu
# echo "CC_i686_unknown_linux_gnu=i686-linux-gnu-gcc" >> $GITHUB_ENV
# echo "CXX_i686_unknown_linux_gnu=i686-linux-gnu-g++" >> $GITHUB_ENV
# echo "AR_i686_unknown_linux_gnu=i686-linux-gnu-ar" >> $GITHUB_ENV
# fi
sudo apt-get update
cargo binstall cargo-ndk --force
cargo ndk-env --target ${{ matrix.target }} > ndk-env.sh
env | sort > env_before.txt
source ndk-env.sh
env | sort > env_after.txt
comm -13 env_before.txt env_after.txt >> $GITHUB_ENV
fi
if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
sudo apt-get update
sudo apt-get install g++-aarch64-linux-gnu
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
echo "AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar" >> $GITHUB_ENV
fi
if [[ "${{ matrix.target }}" == "armv7-unknown-linux-gnueabihf" ]]; then
sudo apt-get update
sudo apt-get install g++-arm-linux-gnueabihf
echo "CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc" >> $GITHUB_ENV
echo "CXX_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-g++" >> $GITHUB_ENV
echo "AR_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar" >> $GITHUB_ENV
fi
if [[ "${{ matrix.target }}" == "i686-unknown-linux-gnu" ]]; then
sudo apt-get update
sudo apt-get install g++-i686-linux-gnu
echo "CC_i686_unknown_linux_gnu=i686-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_i686_unknown_linux_gnu=i686-linux-gnu-g++" >> $GITHUB_ENV
echo "AR_i686_unknown_linux_gnu=i686-linux-gnu-ar" >> $GITHUB_ENV
fi

# - name: cargo check executorch-sys
# run: cargo check --target ${{ matrix.target }} --all-features
# working-directory: executorch-sys
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
# - name: cargo check executorch
# run: cargo check --target ${{ matrix.target }} --all-features
# working-directory: executorch
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
- name: cargo check executorch-sys
run: cargo check --target ${{ matrix.target }} --all-features
working-directory: executorch-sys
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"
- name: cargo check executorch
run: cargo check --target ${{ matrix.target }} --all-features
working-directory: executorch
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"

# - name: Clippy executorch-sys
# run: cargo clippy --target ${{ matrix.target }} --all-features
# working-directory: executorch-sys
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
# - name: Clippy executorch
# run: cargo clippy --target ${{ matrix.target }} --all-features
# working-directory: executorch
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
- name: Clippy executorch-sys
run: cargo clippy --target ${{ matrix.target }} --all-features
working-directory: executorch-sys
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"
- name: Clippy executorch
run: cargo clippy --target ${{ matrix.target }} --all-features
working-directory: executorch
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"

# rust-version-check-clippy:
# # check that we can build using different rust versions:
# # - the minimal rust version that is specified by this crate
# # - the latest stable version
# runs-on: ubuntu-latest
# strategy:
# matrix:
# rust-version: ["msrv", "stable"]
# steps:
# - uses: actions/checkout@v7
# - name: Install toml-cli using cargo
# uses: baptiste0928/cargo-install@v3
# with:
# crate: toml-cli
# version: "^0.2"
# - name: Determine Rust version
# id: rust-version
# run: |
# if [ "${{ matrix.rust-version }}" = "stable" ]; then
# rust_version="stable"
# else
# rust_version=$(toml get Cargo.toml package.rust-version --raw)
# fi
# echo "Rust version: '$rust_version'"
# echo "rust_version=$rust_version" >> "$GITHUB_OUTPUT"
# working-directory: executorch
# - name: Install Rust
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: ${{ steps.rust-version.outputs.rust_version }}
# components: clippy
# cache-workspaces: |
# executorch
# executorch-sys
rust-version-check-clippy:
# check that we can build using different rust versions:
# - the minimal rust version that is specified by this crate
# - the latest stable version
runs-on: ubuntu-latest
strategy:
matrix:
rust-version: ["msrv", "stable"]
steps:
- uses: actions/checkout@v7
- name: Install toml-cli using cargo
uses: baptiste0928/cargo-install@v3
with:
crate: toml-cli
version: "^0.2"
- name: Determine Rust version
id: rust-version
run: |
if [ "${{ matrix.rust-version }}" = "stable" ]; then
rust_version="stable"
else
rust_version=$(toml get Cargo.toml package.rust-version --raw)
fi
echo "Rust version: '$rust_version'"
echo "rust_version=$rust_version" >> "$GITHUB_OUTPUT"
working-directory: executorch
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ steps.rust-version.outputs.rust_version }}
components: clippy
cache-workspaces: |
executorch
executorch-sys

# - name: cargo check executorch
# run: cargo check --all-features
# working-directory: executorch
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
# - name: cargo clippy executorch
# run: cargo clippy --all-features
# working-directory: executorch
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
- name: cargo check executorch
run: cargo check --all-features
working-directory: executorch
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"
- name: cargo clippy executorch
run: cargo clippy --all-features
working-directory: executorch
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"

# - name: cargo check executorch-sys
# run: cargo check --all-features
# working-directory: executorch-sys
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
# - name: cargo clippy executorch-sys
# run: cargo clippy --all-features
# working-directory: executorch-sys
# env:
# EXECUTORCH_RS_LINK: 0
# RUSTFLAGS: "-D warnings"
- name: cargo check executorch-sys
run: cargo check --all-features
working-directory: executorch-sys
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"
- name: cargo clippy executorch-sys
run: cargo clippy --all-features
working-directory: executorch-sys
env:
EXECUTORCH_RS_LINK: 0
RUSTFLAGS: "-D warnings"
6 changes: 3 additions & 3 deletions .github/workflows/ci_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copy of executorch/requirements-dev.txt as of v1.1.0
# Copy of executorch/requirements-dev.txt as of v1.2.0

cmake>=3.29, <4.0.0 # For building binary targets in the wheel.
packaging>=24.2 # Lower bound required by setuptools
Expand All @@ -9,5 +9,5 @@ wheel # For building the pip package archive.
zstd # Imported by resolve_buck.py.
certifi # Imported by resolve_buck.py.
lintrunner==0.12.7
lintrunner-adapters==0.12.6
torch==2.10.0
lintrunner-adapters==0.13.0
torch==2.11.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ See `example/hello_world` for a complete example.
## Build
To use the library you must compile the C++ executorch library yourself, as there are many configurations that
determines which modules, backends, and operations are supported. See the `executorch-sys` crate for more info.
Currently the supported Cpp executorch version is `1.1.0`.
Currently the supported Cpp executorch version is `1.2.0`.


## Cargo Features
Expand Down
3 changes: 3 additions & 0 deletions etc/download_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def main():
"runtime/core/**/*.h",
"runtime/executor/**/*.h",
"runtime/platform/**/*.h",
"runtime/backend/options.h",
"runtime/backend/backend_options_map.h",
"extension/data_loader/**/*.h",
"extension/memory_allocator/**/*.h",
"extension/module/**/*.h",
Expand All @@ -50,6 +52,7 @@ def main():
]
excludes = [
"runtime/executor/platform_memory_allocator.h",
"runtime/executor/program_validation.h",
"runtime/platform/compat_unistd.h",
"runtime/core/exec_aten/util/tensor_shape_to_c_string.h",
"runtime/core/defines.h",
Expand Down
Loading
Loading