From 205938a2a8b6248ba08de89e468f7aebf40c57e3 Mon Sep 17 00:00:00 2001 From: Roger Aiudi Date: Tue, 25 May 2021 13:42:53 -0400 Subject: [PATCH] CI: Build and release on 32bit Windows Python Signed-off-by: Roger Aiudi --- .github/workflows/build.yml | 9 ++++++++- .github/workflows/release.yml | 9 ++++++++- ci/lib-setup.sh | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69ad7c2a..2549fde3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,6 +66,10 @@ "win-py-3.7", "win-py-3.6", ], + "arch": [ + "x64", + "x86" + ], "include": [ { "name": "win-py-3.9", @@ -94,7 +98,10 @@ { "name": "Install the right python", "uses": "actions/setup-python@v2", - "with": { "python-version": "${{ matrix.pyenv }}" }, + "with": { + "python-version": "${{ matrix.pyenv }}", + "architecture": "${{ matrix.arch }}" + }, }, { "name": "Build and test gssapi", diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 600a6657..da9015eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,10 @@ "win-wheel-3.7", "win-wheel-3.6", ], + "arch": [ + "x64", + "x86" + ], "include": [ { "name": "win-wheel-3.9", @@ -113,7 +117,10 @@ { "name": "Install the right python", "uses": "actions/setup-python@v2", - "with": { "python-version": "${{ matrix.pyenv }}" }, + "with": { + "python-version": "${{ matrix.pyenv }}", + "architecture": "${{ matrix.arch }}" + }, }, { "name": "Create and upload Windows wheel", diff --git a/ci/lib-setup.sh b/ci/lib-setup.sh index c90b530f..9ee952a2 100755 --- a/ci/lib-setup.sh +++ b/ci/lib-setup.sh @@ -64,6 +64,11 @@ setup::macos::install() { setup::windows::install() { CHINST="choco install --no-progress --yes --ignore-detected-reboot --allow-downgrade" + # Install the 32bit version if Python is 32bit + if python -c "assert __import__('sys').maxsize <= 2**32"; then + CHINST="$CHINST --x86" + fi + # Install MIT Kerberos. choco will fail despite the installation working. $CHINST mitkerberos --install-arguments "'ADDLOCAL=ALL'" || true