-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Get the Python version of the base image from a build argument | ||
ARG PYTHON_VERSION | ||
FROM winamd64/python:$PYTHON_VERSION-windowsservercore | ||
|
||
ARG WHEEL_NAME | ||
ARG CIBW_TEST_REQUIRES | ||
|
||
# Copy and install the Windows wheel | ||
COPY $WHEEL_NAME $WHEEL_NAME | ||
RUN pip install $env:WHEEL_NAME | ||
|
||
# Install the testing dependencies | ||
RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
PYTHON_VERSION=$1 | ||
|
||
TEMP_FOLDER="$HOME/AppData/Local/Temp" | ||
WHEEL_PATH=$(ls -d $TEMP_FOLDER/**/*/repaired_wheel/*) | ||
WHEEL_NAME=$(basename $WHEEL_PATH) | ||
|
||
cp $WHEEL_PATH $WHEEL_NAME | ||
|
||
# Dot the Python version for identyfing the base Docker image | ||
PYTHON_VERSION=$(echo ${PYTHON_VERSION:0:1}.${PYTHON_VERSION:1:2}) | ||
|
||
if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then | ||
PYTHON_VERSION="$PYTHON_VERSION-rc" | ||
fi | ||
# Build a minimal Windows Docker image for testing the wheels | ||
docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ | ||
--build-arg WHEEL_NAME=$WHEEL_NAME \ | ||
--build-arg CIBW_TEST_REQUIRES="$CIBW_TEST_REQUIRES" \ | ||
-f ./.github/Windows \ | ||
-t coincurve/minimal-windows . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
PYTHON_VERSION=$1 | ||
|
||
docker container run --rm scikit-learn/minimal-windows \ | ||
powershell -Command "pytest" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,29 @@ jobs: | |
path: wheelhouse/*.whl | ||
if-no-files-found: error | ||
|
||
windows-wheels-standard: | ||
name: Build Windows wheels | ||
needs: | ||
- test | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BEFORE_TEST_WINDOWS: bash {project}/.github/scripts/build-minimal-windows-image.sh 312 | ||
CIBW_TEST_COMMAND_WINDOWS: bash {project}/.github/scripts/test-windows-wheels.sh 312 | ||
CIBW_TEST_REQUIRES: pytest pytest-benchmark | ||
CIBW_TEST_COMMAND: python -m pytest {project}/tests | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: wheelhouse/*.whl | ||
if-no-files-found: error | ||
|
||
macos-wheels-x86-64: | ||
name: Build macOS wheels | ||
needs: | ||
|