add some todo #236
Workflow file for this run
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
# SPDX-FileCopyrightText: © 2023 Foundation Devices, Inc. <hello@foundationdevices.com> | |
# 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.77 | |
- 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.77 | |
- 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 |