Skip to content

Fix empty initializer lists #84

Fix empty initializer lists

Fix empty initializer lists #84

Workflow file for this run

name: build-and-test
on:
workflow_dispatch:
pull_request:
branches:
- "**"
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
concurrency:
group: build-and-test-${{ github.ref }}-${{ matrix.python-version }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install cmake
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install cppwg
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with flake8
run: python -m flake8
- name: Test wrapper generation
run: python -m unittest tests/test_shapes.py
- name: Generate new wrappers
run: |
cd examples/shapes/wrapper
rm -rf geometry math_funcs primitives
cd ..
cppwg src/ \
--wrapper_root wrapper/ \
--package_info wrapper/package_info.yaml \
--includes src/*/ \
--std c++17
- name: Build Python module
run: |
cd examples/shapes
mkdir build
cd build
cmake ..
make -j $(nproc)
- name: Test built module
run: |
cd examples/shapes/build
python -m unittest test_functions.py
python -m unittest test_classes.py