-
Notifications
You must be signed in to change notification settings - Fork 43
78 lines (78 loc) · 2.41 KB
/
check-ios-android-bindings.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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.toml"
- ".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: cachix/cachix-action@v15
with:
name: xmtp
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- 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: cachix/cachix-action@v15
with:
name: xmtp
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: cache rust artifacts
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