summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Talbert <swt@techie.net>2022-01-26 11:51:32 -0500
committerScott Talbert <swt@techie.net>2022-01-26 12:38:43 -0500
commit634edfbb6da220b5889fa05a473c42337510e2b8 (patch)
tree203540f6b8fe679299ec470b9f7a6b64a1c19c85
parentb24cdaa4e676f2385c20ab264b275dcdfbd0238b (diff)
downloadpycurl-634edfbb6da220b5889fa05a473c42337510e2b8.tar.gz
Add CI for Windows
-rw-r--r--.github/workflows/ci-windows.yml58
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml
new file mode 100644
index 0000000..fb2febd
--- /dev/null
+++ b/.github/workflows/ci-windows.yml
@@ -0,0 +1,58 @@
+name: CI-Windows
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: windows-latest
+ env:
+ VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
+ strategy:
+ matrix:
+ python-version: ["3.7", "3.8", "3.9", "3.10"]
+ fail-fast: false
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: ./.github/actions/msvc-dev-cmd
+ with:
+ arch: 'x86'
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: 'x86'
+ - name: 'Setup NuGet credentials'
+ shell: 'bash'
+ run: >
+ `vcpkg fetch nuget | tail -n 1`
+ sources add
+ -source "https://nuget.pkg.github.com/pycurl/index.json"
+ -storepasswordincleartext
+ -name "GitHub"
+ -username "pycurl"
+ -password "${{ secrets.GITHUB_TOKEN }}"
+ - name: Install packages
+ run: |
+ vcpkg install curl[core,http2,non-http,openssl,ssh]:x86-windows
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest wheel delvewheel
+ pip install -r requirements-dev.txt
+ - name: Build
+ run: |
+ python setup.py bdist_wheel --with-openssl --curl-dir=$env:VCPKG_INSTALLATION_ROOT/packages/curl_x86-windows --openssl-dir=$env:VCPKG_INSTALLATION_ROOT/packages/openssl_x86-windows --openssl-lib-name=libssl.lib --link-arg=libcrypto.lib
+ - name: Repair & install built wheel
+ run: |
+ delvewheel repair --add-path $VCPKG_INSTALLATION_ROOT/installed/x86-windows/bin dist/*.whl
+ pip install wheelhouse/*.whl
+ shell: bash
+ - name: Test with pytest
+ run: |
+ pytest -v