Skip to content

Use conda-forge numpy to fix Win+py311 issues #103

Use conda-forge numpy to fix Win+py311 issues

Use conda-forge numpy to fix Win+py311 issues #103

Workflow file for this run

name: mvtb-main
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
unittest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-13]
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Set up Micromamba for Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
init-shell: >-
bash
powershell
environment-name: myenv
create-args: >-
python=${{ matrix.python-version }}
numpy<2
pip
pytest
pytest-timeout
pytest-xvfb
matplotlib-base
setuptools
setuptools-scm
open3d
wcwidth
scipy
opencv
spatialmath-python
ansitable
- name: Install libegl on Linux
if: runner.os == 'Linux'
run: micromamba install -y -n myenv -c conda-forge libegl
- name: Install package and data package
run: |
micromamba run -n myenv python -m pip install .[dev] --no-deps --no-build-isolation
# install the data package
cd mvtb-data
micromamba run -n myenv python -m pip install . --no-deps --no-build-isolation --verbose
- name: Test with pytest
env:
MPLBACKEND: TkAgg
run: |
micromamba run -n myenv python -m pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
codecov:
# If all tests pass:
# Run coverage and upload to codecov
needs: unittest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Micromamba for Python 3.11
uses: mamba-org/setup-micromamba@v2
with:
init-shell: >-
bash
powershell
environment-name: myenv
create-args: >-
python=3.11
coverage
numpy<2
pip
pytest
pytest-timeout
pytest-xvfb
matplotlib-base
setuptools
setuptools-scm
open3d
wcwidth
scipy
opencv
spatialmath-python
ansitable
- name: Install libegl on Linux
if: runner.os == 'Linux'
run: micromamba install -y -n myenv -c conda-forge libegl
- name: Install package and data package
run: |
micromamba run -n myenv python -m pip install .[dev] --no-deps --no-build-isolation
# install the data package
cd mvtb-data
micromamba run -n myenv python -m pip install . --no-deps --no-build-isolation
- name: Run coverage
run: |
micromamba run -n myenv coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
micromamba run -n myenv coverage report
micromamba run -n myenv coverage xml
- name: upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml