Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: iOS Bindings #846

Merged
merged 49 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
44f6529
(fix: cargo) Fixed warning about depreciated use of "default_features"
ElusAegis Sep 17, 2024
fa11912
(fix: cargo) Fixed warning about unused Halo2 `rev`
ElusAegis Sep 17, 2024
6a182a3
(fix: cargo) Fixed issue of linking to the same repo
ElusAegis Sep 17, 2024
f16cfe3
(chore: cargo) Updated Cargo.lock to represent the pdated link to the…
ElusAegis Sep 17, 2024
01b088e
(chore: cargo) Moved .config/cargo to .config/cargo.toml to get rid o…
ElusAegis Sep 17, 2024
16a557f
(fix: cargo) Fixed warning about depreciated use of "default_features"
ElusAegis Sep 17, 2024
4fd1cdc
(feat: bindings) Initial setup of bindings
ElusAegis Sep 17, 2024
ccce24d
(feat: bindings) Sample workflow file for pushing bindings
ElusAegis Sep 17, 2024
c4a5492
(feat: bindings) Revised logic to reduce the code complexity and shar…
ElusAegis Sep 17, 2024
3662685
(feat: cargo) Lean version of the bindings by cutting down on the amo…
ElusAegis Sep 17, 2024
3450778
(feat: cargo) Moved all logic from wasm to universal and imported it …
ElusAegis Sep 17, 2024
ed88cbc
(feat: python) Moved python bindings to the bindings folder
ElusAegis Sep 21, 2024
fbdfce6
(feat: ci/cd) Updated the workflow for publishing updates to the iOS …
ElusAegis Sep 21, 2024
495622a
(chore: ios) Updated the function arguments to be consistent
ElusAegis Sep 21, 2024
a05af84
(feat: ci/cd) Updated the workflow to remove need for Git LFS as we n…
ElusAegis Sep 21, 2024
07cbba0
(feat: ci/cd) Renamed the workflow
ElusAegis Sep 21, 2024
c2a280d
(fix: ci/cd) Fixed the cp for relocated build file
ElusAegis Sep 21, 2024
b47f3ff
(feat: ci/cd) Updated workflow to hit the default branch
ElusAegis Sep 21, 2024
5161606
(fix: merging) Fixed an issue after merging
ElusAegis Oct 1, 2024
54a7839
(fix: wasm) Fixed a relative import issue for WASM bindings tests
ElusAegis Oct 4, 2024
fc8ef13
(fix: test) Fix ios compilation issue
ElusAegis Oct 8, 2024
ec8b01f
(fix: bindings) fixed fn parameter naming issue
ElusAegis Oct 8, 2024
ddab6f4
(feat: tests) added ios tests scaffolding
ElusAegis Oct 8, 2024
fabd99b
(feat: tests) moved tests assets to a specific folder
ElusAegis Oct 8, 2024
53be7c4
(fix: bindings) Changed naming of function params
ElusAegis Oct 8, 2024
cea005b
(fix: bindings) Reorder dependencies
ElusAegis Oct 8, 2024
5490e14
(fix: bindings) Depreciated `target_os=ios` in favour of a feature
ElusAegis Oct 14, 2024
36f3a05
(feat: cargo) Optimised Cargo for ios-bindings
ElusAegis Oct 15, 2024
d4734b9
(feat: ios) Opened up more ios tests
ElusAegis Oct 15, 2024
904fcac
(feat: github) Workflow updated
ElusAegis Oct 15, 2024
18ab404
(chore: github) Renamed the `swift-package-tests` job
ElusAegis Oct 15, 2024
171173a
(chore: cargo) Cleaned up dependencies
ElusAegis Oct 15, 2024
163a126
(fix: ios) fixed the ios binding generating script
ElusAegis Oct 15, 2024
6c41464
(chore: cargo) Cleaned up dependencies
ElusAegis Oct 15, 2024
9d0cf40
(fix: cargo) fix an issue with `ezkl` feature
ElusAegis Oct 15, 2024
1b821d9
(feat: github) Made ios jobs independent of other jobs
ElusAegis Oct 15, 2024
0cda88f
(feat: cargo) Made project depend on `ezkl` feature properly
ElusAegis Oct 16, 2024
8f8370e
(chore: cargo) removed redundant cfg statements
ElusAegis Oct 16, 2024
2522aaf
(fix: ios) fixed ios feature misconfiguration
ElusAegis Oct 16, 2024
fd63f31
(chore: cargo) removed unused dependencies
ElusAegis Oct 16, 2024
8bdf1fc
(feat: cargo) optimised dependencies
ElusAegis Oct 16, 2024
9ac5ee6
(feat: fmt) cleaned up the code
ElusAegis Oct 16, 2024
cd473a6
(fix: dep) removed forgotten import
ElusAegis Oct 16, 2024
00f1472
(chore: cfg) changed feature cfg to be more straightforward
ElusAegis Oct 16, 2024
01ab662
(fix: ios) use correct ios build.rs feature for tests
ElusAegis Oct 16, 2024
9dc0308
(chore: ios) fixed the ios test to not show compile warning
ElusAegis Oct 16, 2024
ecb1b24
(chore: github) updated github workflow to be able to run on the main…
ElusAegis Oct 16, 2024
5b121f6
(chore: github) updated github workflows to work with zkconduit ezkl-…
ElusAegis Oct 18, 2024
9f370ee
fix: Cargo dependency override
ElusAegis Oct 22, 2024
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
File renamed without changes.
63 changes: 63 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -688,3 +688,66 @@ jobs:
run: source .env/bin/activate; cargo nextest run py_tests::tests::nbeats_
# - name: Reusable verifier tutorial
# run: source .env/bin/activate; cargo nextest run py_tests::tests::reusable_

ios-integration-tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-07-18
override: true
components: rustfmt, clippy
- uses: baptiste0928/cargo-install@v1
with:
crate: cargo-nextest
locked: true
- name: Run ios tests
run: CARGO_BUILD_TARGET=aarch64-apple-darwin RUSTUP_TOOLCHAIN=nightly-2024-07-18-aarch64-apple-darwin cargo test --test ios_integration_tests --features ios-bindings-test --no-default-features

swift-package-tests:
runs-on: macos-latest
needs: [ios-integration-tests]

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-07-18
override: true
components: rustfmt, clippy
- name: Build EzklCoreBindings
run: CONFIGURATION=debug cargo run --bin ios_gen_bindings --features "ios-bindings uuid camino uniffi_bindgen" --no-default-features

- name: Clone ezkl-swift- repository
run: |
git clone https://github.com/zkonduit/ezkl-swift-package.git

- name: Copy EzklCoreBindings
run: |
rm -rf ezkl-swift-package/Sources/EzklCoreBindings
cp -r build/EzklCoreBindings ezkl-swift-package/Sources/

- name: Set up Xcode environment
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept

- name: Run Package Tests
run: |
cd ezkl-swift-package
xcodebuild test \
-scheme EzklPackage \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.5' \
-resultBundlePath ../testResults

- name: Run Example App Tests
run: |
cd ezkl-swift-package/Example
xcodebuild test \
-project Example.xcodeproj \
-scheme EzklApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.5' \
-parallel-testing-enabled NO \
-resultBundlePath ../../exampleTestResults \
-skip-testing:EzklAppUITests/EzklAppUITests/testButtonClicksInOrder
75 changes: 75 additions & 0 deletions .github/workflows/update-ios-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build and Publish EZKL iOS SPM package

on:
workflow_dispatch:
inputs:
tag:
description: "The tag to release"
required: true
push:
tags:
- "*"

jobs:
build-and-update:
runs-on: macos-latest

steps:
- name: Checkout EZKL
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Build EzklCoreBindings
run: CONFIGURATION=release cargo run --bin ios_gen_bindings --features "ios-bindings uuid camino uniffi_bindgen" --no-default-features

- name: Clone ezkl-swift-package repository
run: |
git clone https://github.com/zkonduit/ezkl-swift-package.git

- name: Copy EzklCoreBindings
run: |
rm -rf ezkl-swift-package/Sources/EzklCoreBindings
cp -r build/EzklCoreBindings ezkl-swift-package/Sources/

- name: Set up Xcode environment
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license accept

- name: Run Package Tests
run: |
cd ezkl-swift-package
xcodebuild test \
-scheme EzklPackage \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.5' \
-resultBundlePath ../testResults

- name: Run Example App Tests
run: |
cd ezkl-swift-package/Example
xcodebuild test \
-project Example.xcodeproj \
-scheme EzklApp \
-destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=17.5' \
-parallel-testing-enabled NO \
-resultBundlePath ../../exampleTestResults \
-skip-testing:EzklAppUITests/EzklAppUITests/testButtonClicksInOrder

- name: Commit and Push Changes to feat/ezkl-direct-integration
run: |
cd ezkl-swift-package
git config user.name "GitHub Action"
git config user.email "[email protected]"
git add Sources/EzklCoreBindings
git commit -m "Automatically updated EzklCoreBindings for EZKL"
git tag ${{ github.event.inputs.tag }}
git remote set-url origin https://zkonduit:${EZKL_PORTER_TOKEN}@github.com/zkonduit/ezkl-swift-package.git
git push origin
git push origin --tags
env:
EZKL_PORTER_TOKEN: ${{ secrets.EZKL_PORTER_TOKEN }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var/
node_modules
/dist
timingData.json
!tests/wasm/pk.key
!tests/wasm/vk.key
!tests/assets/pk.key
!tests/assets/vk.key
docs/python/build
!tests/wasm/vk_aggr.key
!tests/assets/vk_aggr.key
Loading
Loading