chores(pyMixtCom): update requirements #104
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: pyMixtComp | |
on: | |
push: | |
branches: | |
- master | |
- staging | |
paths: | |
- 'MixtComp/**' | |
- '!MixtComp/docs/**' | |
- 'pyMixtComp/**' | |
- '.github/workflows/pyMixtComp.yml' | |
- '!**/README.md' | |
pull_request: | |
branches: | |
- master | |
- staging | |
paths: | |
- 'MixtComp/**' | |
- '!MixtComp/docs/**' | |
- 'pyMixtComp/**' | |
- '.github/workflows/pyMixtComp.yml' | |
- '!**/README.md' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout MixtComp | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install MixtComp dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install cmake libboost-all-dev libeigen3-dev libxml2-dev lcov | |
- name: Install MixtComp dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install cmake boost eigen lcov | |
brew install boost-python3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Tests dependencies | |
run: pip install pytest flake8 | |
- name: Install Other Python Dependencies | |
working-directory: pyMixtComp/python | |
run: pip install -r requirements.txt | |
- name: Compile PyMixtCompBridge | |
working-directory: pyMixtComp | |
run: ./build.sh | |
- name: Test PyMixtCompBridge | |
working-directory: pyMixtComp | |
run: ./utest.sh | |
- name: Copy PyMixtCompBridge.so | |
working-directory: pyMixtComp/python | |
run: cp ../build/lib/pyMixtCompBridge.so pyMixtComp/pyMixtCompBridge.so | |
- name: Lint with flake8 | |
working-directory: pyMixtComp/python | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
working-directory: pyMixtComp/python | |
run: pytest tests |