Wheel builder Windows #21
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
# Workflow to build and test wheels | |
name: Wheel builder Windows | |
on: | |
# pull_request: | |
# branches: | |
# - master | |
# release: | |
# types: [published, edited] | |
workflow_dispatch: | |
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: Install OpenCV | |
run: | | |
cd ${{ github.workspace }} | |
build_tools/install_opencv_windows.bat | |
- name: Build a package | |
run: | | |
python --version | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt | |
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp36 --dist-dir=%cd%\wheelhouse -v | |
shell: cmd | |
env: | |
OpenCV_DIR: ${{ github.workspace }}/opencv/opencv/build/x64/vc16 | |
- 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-* |