Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/scripts/build_windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

# Used by Windows CI build jobs.

set -x

curl -LsSf https://astral.sh/uv/install.sh | sh
set -ex

py_ver="${1}"
if [[ "${2}" == 'ft' ]]; then
py_ver="${py_ver}t"
fi

export PATH="${PATH}:${HOME}/.local/bin/"

uv python pin "${py_ver}"
uv python list --only-installed
uv venv
uv build --no-python-downloads --all-packages --wheel
mv ./dist ./package
6 changes: 6 additions & 0 deletions .github/scripts/check_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# Used by Windows CI build jobs.

pip install -r ./packaging/requirements.txt
twine check --strict ./package/*.whl
58 changes: 58 additions & 0 deletions .github/workflows/_build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: " - Wheel (Windows)"

on:
workflow_call:
inputs:
python-version:
required: true
type: string
free-threaded:
description: 'Whether FT Python or not. Valid value is "ft" or not.'
default: ''
type: string
run-test:
required: false
default: 'false'
type: string
os:
default: "windows-latest"
type: string

env:
ARTIFACT: wheel-win-py${{ inputs.python-version }}${{ inputs.free-threaded }}

jobs:
build:
runs-on: "${{ inputs.os }}"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build
env:
SPDL_USE_TRACING: 0
SPDL_BUILD_STUB: 0
shell: cmd
run: |
packaging/vc_env_helper.bat ^
bash ^
.github/scripts/build_windows.sh ^
"${{ inputs.python-version }}" ^
"${{ inputs.free-threaded }}"

- uses: actions/upload-artifact@v4
name: Upload build artifact
with:
name: "${{ env.ARTIFACT }}"
path: package
if-no-files-found: error
retention-days: 7
overwrite: true

- name: Check package
shell: cmd
run: |
packaging/vc_env_helper.bat ^
bash ^
.github/scripts/check_package.sh
19 changes: 19 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ jobs:
free-threaded: "${{ matrix.free-threaded }}"
run-test: "false"

#############################################################################
# Windows
#############################################################################
windows:
name: "Windows"
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
free-threaded: [""]
include:
- python-version: "3.13"
free-threaded: "ft"
uses: ./.github/workflows/_build_windows.yml
with:
python-version: "${{ matrix.python-version }}"
free-threaded: "${{ matrix.free-threaded }}"
run-test: "${{ matrix.python-version == '3.11'}}"

#############################################################################
# Linux (CPU)
#############################################################################
Expand Down
Loading