build(deps): bump install-pinned/mypy from 8fd8c50eff0144780246d326dc2159289f090e33 to 52365a71b7d64ebed3db400b67077d3e91a769b4 #184
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
name: C-API | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-test: | |
name: Build and test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "build-test" | |
- name: Cargo build | |
run: cargo build -p rustsat-capi --verbose | |
env: | |
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }} | |
- name: Cargo test | |
run: cargo test -p rustsat-capi --verbose | |
env: | |
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }} | |
version: | |
name: Ensure C-API crate version is in sync | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Check | |
run: "[ \"$(grep '^version = ' rustsat/Cargo.toml)\" = \"$(grep '^version = ' capi/Cargo.toml)\" ]" | |
cbindgen: | |
name: Test generated C header | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Check C header | |
run: | | |
cargo install cbindgen | |
cbindgen -c capi/cbindgen.toml --crate rustsat-capi -o capi/rustsat.h --verify |