-
-
Notifications
You must be signed in to change notification settings - Fork 8
112 lines (92 loc) · 2.64 KB
/
Copy pathffi-check.yml
File metadata and controls
112 lines (92 loc) · 2.64 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: FFI check
on:
push:
branches: [main]
paths:
- "xmtp-ffi/**"
- ".github/workflows/ffi-check.yml"
pull_request:
branches: [main]
paths:
- "xmtp-ffi/**"
- ".github/workflows/ffi-check.yml"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
# Must match Makefile NIGHTLY (cbindgen parse.expand).
NIGHTLY: nightly-2026-08-03
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 90
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@1.97.1
- uses: mozilla-actions/sccache-action@v0.0.11
with:
version: "v0.10.0"
- name: libxmtp tag
id: libxmtp
run: |
tag=$(sed -n 's/.*tag = "\([^"]*\)".*/\1/p' xmtp-ffi/Cargo.toml | head -1)
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
- uses: Swatinem/rust-cache@v2
with:
workspaces: xmtp-ffi
key: ${{ steps.libxmtp.outputs.tag }}
- name: cargo +1.97.1 check
run: cargo +1.97.1 check --manifest-path xmtp-ffi/Cargo.toml
deny:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@1.97.1
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- name: cargo deny (workspace + xmtp-ffi)
run: |
cargo deny --manifest-path xmtp-sys/Cargo.toml check
cargo deny --manifest-path xmtp-ffi/Cargo.toml check
header:
name: header dirty
runs-on: ubuntu-latest
timeout-minutes: 90
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY }}
- uses: mozilla-actions/sccache-action@v0.0.11
with:
version: "v0.10.0"
- name: libxmtp tag
id: libxmtp
run: |
tag=$(sed -n 's/.*tag = "\([^"]*\)".*/\1/p' xmtp-ffi/Cargo.toml | head -1)
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
- uses: Swatinem/rust-cache@v2
with:
workspaces: xmtp-ffi
key: header-${{ steps.libxmtp.outputs.tag }}
- name: Regenerated header matches committed
run: |
make header NIGHTLY="$NIGHTLY"
git diff --exit-code xmtp-ffi/include/xmtp_ffi.h