Skip to content

Build python-ldap wheels for Windows #3

Build python-ldap wheels for Windows

Build python-ldap wheels for Windows #3

Workflow file for this run

name: Build python-ldap wheels for Windows
on:
workflow_dispatch:
env:
OPENSSL_VER: openssl-1.1.1w
OPENLDAP_VER: openldap-2.4.59
PYTHONLDAP_VER: python-ldap-3.4.4
CIBW_TEST_COMMAND: python -c"import ldap;print(ldap.__version__)"
CIBW_SKIP: 'pp* cp36*'
MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT: 1
jobs:
build_amd64:
name: Build AMD64 wheels
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os:
- [windows-2022, win_amd64]
python:
- cp310
- cp311
- cp312
env:
VS_PLATFORM: x64
OPENSSL_CONFIG: VC-WIN64A-masm
steps:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- run: build_openssl.cmd
shell: cmd
- run: build_openldap.cmd
shell: cmd
- run: build_python-ldap.cmd
shell: cmd
- uses: pypa/[email protected]
env:
CIBW_ARCHS: AMD64
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.os[1] }}
- uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
build_x86:
name: Build x86 wheels
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os:
- [windows-2022, win32]
python:
- cp310
- cp311
- cp312
env:
VS_PLATFORM: Win32
OPENSSL_CONFIG: VC-WIN32
steps:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
with:
msbuild-architecture: x86
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- uses: ilammy/setup-nasm@v1
- run: build_openssl.cmd
shell: cmd
- run: build_openldap.cmd
shell: cmd
- run: build_python-ldap.cmd
shell: cmd
- uses: pypa/[email protected]
env:
CIBW_ARCHS: x86
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.os[1] }}
- uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
upload_assets:
name: Upload release assets
runs-on: ubuntu-latest
needs:
- build_amd64
- build_x86
# - build_arm64
steps:
- name: Generate release name
id: release-name
run: printf 'RELEASE_NAME=%s\n' "$(date +%Y%m%d-%H%M%S)" >"GITHUB_OUTPUT"
- name: Fetch assets
id: fetch-assets
uses: actions/download-artifact@v4
with:
name: wheels
- name: Upload release assets
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
name: ${{ steps.release-name.outputs.RELEASE_NAME }}
artifacts: ${{ steps.fetch-assets.outputs.download-path }}/*.whl
# ARM64 wheel is broken
# build_arm64:
# name: Build ARM64 wheels
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [windows-2022]
# env:
# VS_PLATFORM: ARM64
# OPENSSL_CONFIG: VC-WIN64-ARM
# steps:
# - uses: actions/checkout@v4
# - uses: microsoft/[email protected]
# with:
# msbuild-architecture: arm64
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: amd64_arm64
# - run: build.cmd
# shell: cmd
# - uses: pypa/[email protected]
# env:
# CIBW_SKIP: "pp* cp36* cp37* cp38* cp39* cp310*"
# CIBW_ARCHS_WINDOWS: ARM64
# - uses: actions/upload-artifact@v3
# with:
# path: ./wheelhouse/*.whl