🎨 adjust code structure #10
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: check-build | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build-cpp: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: install build tools and dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y g++ build-essential cmake | |
sudo apt install -y libeigen3-dev libomp-dev | |
- name: build | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
make | |
build-python: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: install build tools and dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y g++ build-essential cmake | |
sudo apt install -y libeigen3-dev libomp-dev | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install python dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install numpy | |
- name: build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DBUILD_PYTHON=ON -DPYTHON_EXECUTABLE=$(which python3) | |
make | |
cd python && pip install . |