Skip to content

Commit

Permalink
#20 test built module
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Mar 19, 2024
1 parent ce6ec05 commit 7c44ca2
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ jobs:
- 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 dependencies
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml pygccxml castxml
Expand All @@ -36,5 +41,30 @@ jobs:
run: |
echo "PYTHONPATH=${{ github.workspace }}/cppwg:$PYTHONPATH" >> ${GITHUB_ENV}
- name: Run tests
- name: Test wrapper generation
run: python -m unittest tests/test_shapes.py

- name: Generate new wrappers
run: |
rm -rf shapes/wrapper/geometry \
shapes/wrapper/math_funcs \
shapes/wrapper/primitives
python shapes/wrapper/generate.py \
--source_root shapes/src/ \
--wrapper_root shapes/wrapper/ \
--castxml_binary $(which castxml) \
--package_info shapes/wrapper/package_info.yaml \
--includes shapes/src/
- name: Build Python module
run: |
cd shapes
mkdir build
cd build
cmake ..
make -j $(nproc)
- name: Test built module
run: |
python -m unittest test_functions.py
python -m unittest test_classes.py

0 comments on commit 7c44ca2

Please sign in to comment.