-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (43 loc) · 1.46 KB
/
ffi.yaml
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
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
name: Foreign Function Interface
on: [push]
jobs:
is-header-up-to-date:
name: Is header file up to date?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.75
- run: cargo install cbindgen@^0.24
- run: |
cbindgen --config ffi/cbindgen.toml \
--output ffi/include/foundation.h \
--verify \
ffi/
is-integration-code-formatted:
name: Is integration code formatted?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y clang-format
- run: clang-format --version
- run: clang-format --dry-run --Werror ffi/integration/*.cpp
integration-test-passes:
name: Integration test passes?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.75
- run: sudo apt-get install -y cmake nlohmann-json3-dev
- run: |
cmake -S ffi/integration/ \
-B ffi/integration/cmake-build-debug \
-Werror=dev \
-Werror=deprecated
- run: cmake --build ffi/integration/cmake-build-debug
- run: ctest --test-dir ffi/integration/cmake-build-debug