Build and test python package on Windows CI (#3049)

This commit is contained in:
Cheng
2026-01-24 07:22:36 +09:00
committed by GitHub
parent dc81c1503a
commit fd27829efa
10 changed files with 44 additions and 12 deletions
+10 -2
View File
@@ -3,7 +3,8 @@ name: 'Build on Windows'
runs:
using: 'composite'
steps:
- name: Build CPP only
- name: Install Python package
id: python-build
shell: cmd
env:
# For MSVC, Ninja/Release is the only config supported by ccache.
@@ -14,5 +15,12 @@ runs:
-DCMAKE_CXX_COMPILER=cl
-DCMAKE_RC_COMPILER=rc
run: |
cmake . -B build %CMAKE_ARGS%
uv pip install ".[dev]" -v
:: Pass the CMAKE_ARGS to following steps.
>>%GITHUB_OUTPUT% ECHO CMAKE_ARGS=%CMAKE_ARGS%
- name: Build CPP only
shell: cmd
run: |
cmake . -B build ${{ steps.python-build.outputs.CMAKE_ARGS }}
cmake --build build -j %NUMBER_OF_PROCESSORS%
+9 -4
View File
@@ -20,10 +20,6 @@ runs:
key: ccache-${{ runner.os }}-${{ runner.arch }}-cpu
max-size: 1GB
- uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
- name: Setup Visual Studio cmd
shell: cmd
run: |
@@ -35,3 +31,12 @@ runs:
call "%VSPATH%\VC\Auxiliary\Build\vcvarsall.bat" x64
:: Export to all steps.
>>%GITHUB_ENV% set
- uses: astral-sh/setup-uv@v7
- name: Setup Python venv
shell: cmd
run: |
uv venv --python ${{ inputs.python-version }}
call ".venv/Scripts/activate.bat"
>>%GITHUB_ENV% set
+7
View File
@@ -3,6 +3,13 @@ name: 'Run tests on Windows'
runs:
using: 'composite'
steps:
- name: Run Python tests - CPU
shell: bash
run: |
echo "::group::Python tests - CPU"
python -m unittest discover python/tests -v
echo "::endgroup::"
- name: Run CPP tests - CPU
shell: bash
env:
-2
View File
@@ -83,8 +83,6 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-windows
with:
use-ccache: false
- uses: ./.github/actions/build-windows
- uses: ./.github/actions/test-windows