feat(v3.2): CI/CD config + Python bindings setup
- Add .gitea/workflows/build.yml (build, test, docs, python binding CI) - Add root pyproject.toml + setup.py (CMake-based pip install) - Add root vde/__init__.py (Python package entry point) - Update README: CI badge, version 3.2.0, Python install instructions - Bump project version to 3.2.0 across CMakeLists.txt, python/setup.py, python/vde/__init__.py - Add build_py/ to .gitignore
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
name: Build & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y cmake g++ libeigen3-dev
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build -j$(nproc)
|
||||
|
||||
- name: Test
|
||||
run: cd build && ctest --output-on-failure
|
||||
|
||||
- name: Generate docs
|
||||
run: |
|
||||
sudo apt-get install -y doxygen graphviz
|
||||
doxygen Doxyfile
|
||||
|
||||
- name: Upload docs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: api-docs
|
||||
path: docs/api/html/
|
||||
|
||||
python-bindings:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: build-and-test
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y cmake g++ libeigen3-dev python3 python3-pip python3-venv
|
||||
|
||||
- name: Build Python bindings
|
||||
run: |
|
||||
cmake -B build_py -DVDE_BUILD_PYTHON=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build_py -j$(nproc)
|
||||
|
||||
- name: Install & test import
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install pybind11
|
||||
PYTHONPATH=build_py/python:$PYTHONPATH python3 -c "import vde; print(f'VDE {vde.__version__} OK')"
|
||||
Reference in New Issue
Block a user