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", "3.11"] fail-fast: false permissions: packages: write steps: - uses: actions/checkout@v3 - uses: ilammy/msvc-dev-cmd@v1 with: arch: 'x86' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} architecture: 'x86' - name: 'Setup NuGet credentials' shell: 'bash' run: | nuget="$(vcpkg fetch nuget | tail -n 1)" "${nuget}" \ sources add \ -source "https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json" \ -storepasswordincleartext \ -name "GitHub" \ -username "${GITHUB_REPOSITORY_OWNER}" \ -password "${{ secrets.GITHUB_TOKEN }}" "${nuget}" \ setapikey "${{ secrets.GITHUB_TOKEN }}" \ -source "https://nuget.pkg.github.com/${GITHUB_REPOSITORY_OWNER}/index.json" - 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 wheel delvewheel pip install flake8 pytest -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 - name: Upload wheel uses: actions/upload-artifact@v3 with: path: wheelhouse/*.whl