-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* android/ios ci --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9f0dd2c
commit fb4fb04
Showing
10 changed files
with
550 additions
and
187 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Check iOS & Android Bindings | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- ".github/workflows/check-ios-android-bindings.yml" | ||
- "bindings_ffi/**" | ||
- "Cargo.toml" | ||
- "Cargo.lock" | ||
- "dev/**" | ||
- "rust-toolchain" | ||
- ".cargo/**" | ||
jobs: | ||
check-swift: | ||
runs-on: warp-macos-13-arm64-6x | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x86_64-apple-darwin | ||
- aarch64-apple-darwin | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v30 | ||
with: | ||
# Mostly to avoid GitHub rate limiting | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- uses: DeterminateSystems/flakehub-cache-action@main | ||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
. | ||
- name: Build target | ||
run: | | ||
nix develop . --command \ | ||
cargo check --target ${{ matrix.target }} --manifest-path bindings_ffi/Cargo.toml | ||
check-android: | ||
runs-on: warp-ubuntu-latest-x64-16x | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- x86_64-linux-android | ||
# We can add other targets later by making a pkg derivation and configuring LD_LIBRARY_PATH | ||
# according to https://github.com/bburdette/tauri-zknotes/blob/7aa3495dc2c8a266d81c2fa3e51ae347e9c2597d/flake.nix#L158 | ||
# but this is good for just checking to ensure it compiles on this target | ||
# Can also run android emulator here after cloning xmtp-android | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v30 | ||
with: | ||
# Mostly to avoid GitHub rate limiting | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- uses: DeterminateSystems/flakehub-cache-action@main | ||
- name: Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
. | ||
- name: check target | ||
run: | | ||
nix develop .#android --command \ | ||
cargo check --target ${{ matrix.target }} --manifest-path bindings_ffi/Cargo.toml |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.