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

Add apps #10

Merged
merged 4 commits into from
Jul 2, 2024
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
96 changes: 94 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
cd test-e2e
curl -L https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar -o jna-5.13.0.jar
CLASSPATH=jna-5.13.0.jar cargo test -- --nocapture
test-xcframework-build:
build-xcframework:
runs-on: macos-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
Expand All @@ -84,7 +84,68 @@ jobs:
override: true
- name: Build iOS xcframework
run: cd test-e2e && cargo run --bin ios
test-android-ffi-build:
- name: Cache xcframework
id: cache-xcframework
uses: actions/cache/save@v4
with:
path: test-e2e/MoproiOSBindings
key: ${{ github.sha }}-xcframework
build-ios-app-device:
runs-on: macos-latest
needs: build-xcframework
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore cached xcframework
id: cache-restore-xcframework
uses: actions/cache/restore@v4
with:
path: test-e2e/MoproiOSBindings
key: ${{ github.sha }}-xcframework
- name: Build app for device
run: xcodebuild -project ./test-e2e/ios/mopro-test.xcodeproj -scheme mopro-test -destination generic/platform=iOS build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
build-ios-app-simulator:
runs-on: macos-latest
needs: build-xcframework
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore cached xcframework
id: cache-restore-xcframework
uses: actions/cache/restore@v4
with:
path: test-e2e/MoproiOSBindings
key: ${{ github.sha }}-xcframework
- name: Build app for device
run: xcodebuild -project ./test-e2e/ios/mopro-test.xcodeproj -scheme mopro-test -destination generic/platform=iOS\ Simulator build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
test-ios-app-simulator:
runs-on: macos-14
needs: build-xcframework
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore cached xcframework
id: cache-restore-xcframework
uses: actions/cache/restore@v4
with:
path: test-e2e/MoproiOSBindings
key: ${{ github.sha }}-xcframework
# to list available simulators: xcrun simctl list devices
- name: Test app in simulator
run: xcodebuild -project ./test-e2e/ios/mopro-test.xcodeproj -scheme mopro-test -destination 'platform=iOS Simulator,name=iPhone 15' test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
build-android-lib:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
Expand All @@ -96,3 +157,34 @@ jobs:
override: true
- name: Build Android bindings
run: cd test-e2e && cargo run --bin android
- name: Cache android lib
id: cache-android-lib
uses: actions/cache/save@v4
with:
path: test-e2e/MoproAndroidBindings
key: ${{ github.sha }}-android-lib
build-android-app:
runs-on: ubuntu-latest
needs: build-android-lib
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Restore cached android lib
id: cache-restore-android-lib
uses: actions/cache/restore@v4
with:
path: test-e2e/MoproAndroidBindings
key: ${{ github.sha }}-android-lib
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v2.0.10
- name: Build android app
run: cd test-e2e/android && ./gradlew build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ mopro-example-app
!templates/mopro-example-app
graph.bin

*.jar
*.xcframework/
15 changes: 15 additions & 0 deletions test-e2e/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
3 changes: 3 additions & 0 deletions test-e2e/android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test-e2e/android/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 123 additions & 0 deletions test-e2e/android/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions test-e2e/android/.idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions test-e2e/android/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions test-e2e/android/.idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions test-e2e/android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions test-e2e/android/.idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions test-e2e/android/.idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions test-e2e/android/.idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions test-e2e/android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading