-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (47 loc) · 1.4 KB
/
validate.yml
File metadata and controls
59 lines (47 loc) · 1.4 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
name: Validate
on:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
validate:
name: Validate Rust Tests & Swift Build
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cbindgen for C header generation
run: cargo install cbindgen
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: flow-core
- name: Run Rust tests
run: |
cd flow-core
cargo test --lib
- name: Build Rust library
run: |
cd flow-core
cargo build
- name: Verify C header is up-to-date
run: |
# Check that the generated header matches what's in the repo
if ! git diff --quiet Sources/CFlow/include/flow.h; then
echo "ERROR: C header is out of sync with Rust FFI"
echo "Generated header differs from committed version."
echo "This likely means new FFI functions were added without updating the header."
echo ""
echo "Differences:"
git diff Sources/CFlow/include/flow.h
exit 1
fi
- name: Build FlowHelper
run: |
cd FlowHelper
swift build
- name: Build Swift package
run: |
swift build