From adc2e467467a00bb9680baa4355630794a4c84af Mon Sep 17 00:00:00 2001 From: Dugal Harris Date: Thu, 16 May 2024 20:40:46 +0200 Subject: [PATCH] add linux specific installs for opencv dependencies --- .github/workflows/install-test-conda-forge.yml | 6 ++++++ .github/workflows/run-unit-tests_conda-forge.yml | 16 ---------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/install-test-conda-forge.yml b/.github/workflows/install-test-conda-forge.yml index e094633..ae68f52 100644 --- a/.github/workflows/install-test-conda-forge.yml +++ b/.github/workflows/install-test-conda-forge.yml @@ -33,6 +33,12 @@ jobs: conda install orthority>=0.4.0 conda list + - name: Install OpenCV Linux dependencies + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libegl1 libopengl0 + - name: Test CLI timeout-minutes: 5 run: | diff --git a/.github/workflows/run-unit-tests_conda-forge.yml b/.github/workflows/run-unit-tests_conda-forge.yml index 814774e..734cbeb 100644 --- a/.github/workflows/run-unit-tests_conda-forge.yml +++ b/.github/workflows/run-unit-tests_conda-forge.yml @@ -32,22 +32,6 @@ jobs: activate-environment: orthority-test conda-solver: libmamba - - name: Install dependencies - # Note that conda-forge OpenCV 4.9 package has *GL dependencies that are not satisfied by - # GitHub's Ubuntu image, so 'opencv-python-headless' is installed with pip below. - run: | - conda info - conda install -c conda-forge rasterio click tqdm pyyaml fsspec requests aiohttp pytest pytest-cov - pip install opencv-python-headless - conda list - - - name: Install OpenCV Linux dependencies - if: matrix.os == 'ubuntu-latest' - run: | - # Fix cv2 ImportError: 'libEGL.so.1: cannot open shared object file: No such file or directory' - sudo apt-get update - sudo apt-get install -y libegl1 libopengl0 - - name: Run unit tests run: | python -m pytest --cov=orthority --cov-report=term-missing --cov-report=xml:coverage.xml ./tests