Skip to content

Build on new tags

Build on new tags #47

Workflow file for this run

# Workflow to build and test wheels
name: Wheel builder Windows
on:
push:
tags:
- 'v*'
jobs:
build-windows-x86_64:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: powershell
strategy:
fail-fast: false
matrix:
os: [windows-2019]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
platform: [x64]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
run: git submodule update --remote
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Build a package
run: |
cd "${{ github.workspace }}"
set "opencv_release_url=https://github.com/opencv/opencv/releases/download/4.7.0/opencv-4.7.0-windows.exe"
set "opencv_installer=opencv_installer.exe"
echo Downloading OpenCV installer...
curl -L -o %opencv_installer% %opencv_release_url%
rem Check if 7-Zip is installed
where 7z > nul
if %errorlevel% neq 0 (
echo 7-Zip is not installed. Downloading...
curl -L -o 7zip_installer.exe https://www.7-zip.org/a/7z2201-x64.exe
echo Installing 7-Zip silently...
start /wait 7zip_installer.exe /S
echo Cleaning up...
del 7zip_installer.exe
)
echo Extracting OpenCV installer...
7z x %opencv_installer% -oopencv
echo Cleaning up...
del %opencv_installer%
echo OpenCV installation completed.
python -m pip install --upgrade pip setuptools wheel
pip install numpy
set "OpenCV_DIR=${{ github.workspace }}/opencv/opencv/build" && python setup.py bdist_wheel --dist-dir=%cd%\wheelhouse -v
shell: cmd
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*.whl
release_daisykit:
# if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build-windows-x86_64] #,test
runs-on: ubuntu-latest
environment: opencv-python-release
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for daisykit
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.DAISYKIT_PYPI_USERNAME }} -p ${{ secrets.DAISYKIT_PYPI_PASSWORD }} --skip-existing wheelhouse/daisykit-*