Skip to content

Commit eaa9ad1

Browse files
committed
Build Windows packages
1 parent cf65927 commit eaa9ad1

File tree

3 files changed

+24
-34
lines changed

3 files changed

+24
-34
lines changed

.github/workflows/build.yaml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
name: Package python packages
22

33
on:
4-
workflow_call:
5-
inputs:
6-
matrix-config:
7-
required: true
4+
- workflow_call
85

96
jobs:
107
build-packages:
118
strategy:
129
matrix:
13-
python-version: $({ fromJson(inputs.matrix-config).python_versions })
14-
os: $({ fromJson(inputs.matrix-config).oses })
10+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
11+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
1512

1613
runs-on: ${{ matrix.os }}
1714

15+
defaults:
16+
run:
17+
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
18+
1819
steps:
1920
- name: Install Windows dependencies
2021
if: runner.os == 'Windows'
2122
uses: msys2/setup-msys2@v2
2223
with:
23-
msystem: ucrt64
24-
install: >-
25-
base-devel
26-
mingw-w64-ucrt-x86_64-cmake
27-
mingw-w64-ucrt-x86_64-ninja
28-
mingw-w64-ucrt-x86_64-toolchain
2924
update: true
3025
location: D:\
26+
path-type: strict
27+
install: >-
28+
git
29+
base-devel
30+
mingw-w64-x86_64-cmake
31+
mingw-w64-x86_64-ninja
32+
mingw-w64-x86_64-toolchain
33+
mingw-w64-x86_64-libxml2
3134
3235
- name: Install Linux dependencies
3336
if: runner.os == 'Linux'
@@ -48,24 +51,18 @@ jobs:
4851
git submodule update --recursive
4952
5053
- name: Set up python
51-
uses: actions/setup-python@v5
54+
uses: actions/setup-python@v6
5255
with:
5356
python-version: ${{ matrix.python-version }}
5457
cache: "pip"
5558

5659
- name: Install python build packages
5760
run: |
58-
python -m pip install --upgrade pip
59-
python -m pip install build
60-
61-
- name: Build wheel Windows
62-
if: runner.os == 'Windows'
63-
shell: msys2 {0}
64-
run: python -m build --wheel
61+
$Python_ROOT_DIR/python -m pip install --upgrade pip
62+
$Python_ROOT_DIR/python -m pip install build
6563
6664
- name: Build wheel
67-
if: runner.os != 'Windows'
68-
run: python -m build --wheel
65+
run: $Python_ROOT_DIR/python -m build --wheel
6966

7067
- name: Build source dist
7168
if: (runner.os == 'Linux') && (matrix.python-version == '3.13')

.github/workflows/release.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@ permissions:
1515
jobs:
1616
package_python:
1717
uses: ./.github/workflows/build.yaml
18-
with:
19-
matrix-config: ./.github/matrix_config.json
2018

2119
check_packages:
2220
needs: package_python
2321
uses: ./.github/workflows/test.yaml
24-
with:
25-
matrix-config: ./.github/matrix_config.json
2622

2723
github_release:
2824
name: Release new packages
25+
needs: check_packages
2926
runs-on: ubuntu-latest
3027
if: github.ref_type == 'tag'
3128
env:
@@ -34,7 +31,6 @@ jobs:
3431
checks: write
3532
contents: write
3633
pull-requests: write
37-
needs: check_packages
3834

3935
steps:
4036
- uses: actions/checkout@v4
@@ -71,8 +67,8 @@ jobs:
7167

7268
publish_pypi:
7369
name: Release new packages
74-
runs-on: ubuntu-latest
7570
needs: check_packages
71+
runs-on: ubuntu-latest
7672
environment: release_${{ github.ref_type }}
7773
permissions:
7874
id-token: write

.github/workflows/test.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
name: Package python packages
22

33
on:
4-
workflow_call:
5-
inputs:
6-
matrix-config:
7-
required: true
4+
- workflow_call
85

96
jobs:
107
build-packages:
118
strategy:
129
matrix:
13-
python-version: $({ fromJson(inputs.matrix-config).python_versions })
14-
os: $({ fromJson(inputs.matrix-config).oses })
10+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
11+
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
1512

1613
runs-on: ${{ matrix.os }}
1714

0 commit comments

Comments
 (0)