Add C++ bindings #2
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++ | |
# spell-checker:ignore DCMAKE | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- 'bindings/cpp/**' | |
- 'CMakeLists.txt' | |
- 'crates/**' | |
- 'Cargo.*' | |
pull_request: | |
branches: ["main"] | |
paths: | |
- 'bindings/cpp/**' | |
- 'CMakeLists.txt' | |
- 'crates/**' | |
- 'Cargo.*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v1 | |
- name: CMake Configure | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ | |
- name: Lint | |
run: just lint-cpp | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: | |
- { cc: "gcc", cxx: "g++" } | |
- { cc: "clang", cxx: "clang++" } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: CMake Configure | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} | |
- name: Build | |
working-directory: build | |
run: make boolean-function | |
- name: Run Tests | |
working-directory: build | |
run: make test |