From 04d2a9ca869161904abc203d8df0dbc49fe288ab Mon Sep 17 00:00:00 2001 From: Breakthrough Date: Sat, 27 Apr 2024 11:47:52 -0400 Subject: [PATCH] [build] Remove Python 3.7 builders and run smoke tests on Windows. --- .github/workflows/build.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f875c85..60a449b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,11 +27,7 @@ jobs: strategy: matrix: os: [macos-13, macos-14, ubuntu-20.04, ubuntu-latest, windows-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] - exclude: - # The macos-14 runner uses M1 hardware but there is no Python 3.7 build for ARM64. - - os: macos-14 - python-version: "3.7" + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -43,34 +39,29 @@ jobs: cache: 'pip' - name: Install Dependencies - - # TODO: `setuptools` is pinned for the Python 3.7 builder and can be unpinned when removed. run: | - python -m pip install --upgrade pip build wheel virtualenv setuptools==62.3.4 + python -m pip install --upgrade pip build wheel virtualenv pip install opencv-python-headless opencv-contrib-python-headless --only-binary :all: pip install -r requirements_headless.txt - - name: Unit Tests + - name: Unit Test run: | python -m pytest tests/ - # TODO: Make the version extraction work on powershell so package smoke tests can run on Windows. - name: Build Package - if: ${{ matrix.os != 'windows-latest' }} + shell: bash run: | python -m build echo "dvr_scan_version=`python -c \"import dvr_scan; print(dvr_scan.__version__.replace('-', '.'))\"`" >> "$GITHUB_ENV" - - name: Smoke Test Package (Source Dist) - if: ${{ matrix.os != 'windows-latest' }} + - name: Smoke Test (Source) run: | python -m pip install dist/dvr_scan-${{ env.dvr_scan_version }}.tar.gz python -m dvr_scan --version python -m dvr_scan -i tests/resources/simple_movement.mp4 -so -df 4 -et 100 python -m pip uninstall -y dvr-scan - - name: Smoke Test Package (Wheel) - if: ${{ matrix.os != 'windows-latest' }} + - name: Smoke Test (Wheel) run: | python -m pip install dist/dvr_scan-${{ env.dvr_scan_version }}-py3-none-any.whl python -m dvr_scan --version