@@ -17,14 +17,14 @@ jobs:
1717 strategy :
1818 matrix :
1919 os : [macos-13, macos-14, macos-15]
20- python : [3.9, "3.10", 3.11, 3.12]
20+ python : [3.9, "3.10", 3.11, 3.12, 3.13 ]
2121 steps :
2222 - name : Checkout
23- uses : actions/checkout@v4
23+ uses : actions/checkout@v4.2.2
2424 with :
2525 submodules : true
2626 - name : Set up Python ${{ matrix.python }}
27- uses : actions/setup-python@v5
27+ uses : actions/setup-python@v5.4.0
2828 with :
2929 python-version : ${{ matrix.python }}
3030 - name : Install deps
@@ -60,20 +60,66 @@ jobs:
6060 pip install delocate
6161 delocate-wheel -v dist/*.whl
6262 - name : Upload Wheels
63- uses : actions/upload-artifact@v4
63+ uses : actions/upload-artifact@v4.6.1
6464 with :
6565 name : osx-wheel-${{ matrix.os }}-${{ matrix.python }}
6666 path : dist
6767
68+ Windows :
69+ name : Build Windows - ${{ matrix.python }}
70+ runs-on : windows-latest
71+ strategy :
72+ matrix :
73+ python : [3.9, "3.10", 3.11, 3.12, 3.13]
74+ arch : [x64]
75+ steps :
76+ - name : Checkout
77+ uses : actions/checkout@v4.2.2
78+ with :
79+ submodules : true
80+ - name : Set up Python ${{ matrix.python }}
81+ uses : actions/setup-python@v5.4.0
82+ with :
83+ python-version : ${{ matrix.python }}
84+ architecture : ${{ matrix.arch }}
85+ - name : Install GSL via vcpkg
86+ run : |
87+ vcpkg install gsl:${{ matrix.arch }}-windows
88+ shell : cmd
89+ - name : Install deps
90+ run : |
91+ pip install --upgrade pip build delvewheel
92+ - name : Fix windows symlinks
93+ run : |
94+ if (Test-Path "lwt_interface") { Remove-Item -Recurse -Force "lwt_interface" }
95+ Copy-Item -Recurse "git-submodules/tskit/python/lwt_interface" "./lwt_interface"
96+ shell : powershell
97+ - name : Build Wheel
98+ run : |
99+ python -m build --wheel
100+ - name : Bundle dynamic libs
101+ run : |
102+ $vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
103+ if (-not $vcpkgRoot) { $vcpkgRoot = "C:\vcpkg" }
104+ $gslBinPath = Join-Path $vcpkgRoot "installed\x64-windows\bin"
105+ $env:PATH = "$gslBinPath;$env:PATH"
106+ delvewheel repair dist/*.whl -w dist/ --add-path "$gslBinPath"
107+ shell : powershell
108+ - name : Upload Wheels
109+ uses : actions/upload-artifact@v4.6.1
110+ with :
111+ name : win-wheel-${{ matrix.python }}
112+ path : dist
113+
68114 manylinux :
69- runs-on : ubuntu-latest
115+ runs-on : ubuntu-24.04
70116 steps :
71117 - name : Checkout
72- uses : actions/checkout@v4
118+ uses : actions/checkout@v4.2.2
73119 with :
74120 submodules : true
75121 - name : Set up Python 3.9
76- uses : actions/setup-python@v5
122+ uses : actions/setup-python@v5.4.0
77123 with :
78124 python-version : 3.9
79125 - name : Build sdist
82128 pip install --upgrade pip build
83129 python -m build --sdist
84130 - name : Upload sdist
85- uses : actions/upload-artifact@v4
131+ uses : actions/upload-artifact@v4.6.1
86132 with :
87133 name : sdist
88134 path : dist
92138 docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh
93139
94140 - name : Upload Wheels
95- uses : actions/upload-artifact@v4
141+ uses : actions/upload-artifact@v4.6.1
96142 with :
97143 name : linux-wheels
98144 path : dist/wheelhouse
@@ -104,14 +150,14 @@ jobs:
104150 strategy :
105151 matrix :
106152 os : [macos-13, macos-14, macos-15]
107- python : [3.9, "3.10", 3.11, 3.12]
153+ python : [3.9, "3.10", 3.11, 3.12, 3.13 ]
108154 steps :
109155 - name : Download wheels
110- uses : actions/download-artifact@v4
156+ uses : actions/download-artifact@v4.2.0
111157 with :
112158 name : osx-wheel-${{ matrix.os }}-${{ matrix.python }}
113159 - name : Set up Python ${{ matrix.python }}
114- uses : actions/setup-python@v5
160+ uses : actions/setup-python@v5.4.0
115161 with :
116162 python-version : ${{ matrix.python }}
117163 - name : Install wheel and test
@@ -126,51 +172,78 @@ jobs:
126172 tskit provenances tmp.trees
127173
128174 manylinux-test :
129- runs-on : ubuntu-latest
175+ runs-on : ubuntu-24.04
130176 needs : ['manylinux']
131177 strategy :
132178 matrix :
133- python : [3.9, "3.10", 3.11, 3.12]
179+ python : [3.9, "3.10", 3.11, 3.12, 3.13 ]
134180 steps :
135181 - name : Download wheels
136- uses : actions/download-artifact@v4
182+ uses : actions/download-artifact@v4.2.0
137183 with :
138184 name : linux-wheels
139185 - name : Set up Python
140- uses : actions/setup-python@v5
186+ uses : actions/setup-python@v5.4.0
141187 with :
142188 python-version : ${{ matrix.python }}
143189 - name : Install wheel and test
144190 run : |
145191 python -VV
146192 # Install the local wheel
147- pip install msprime
148- pip uninstall --yes msprime
149- pip install msprime --no-index --only-binary msprime -f .
193+ pip install numpy newick demes
194+ pip install --no-dependencies msprime --no-index --only-binary msprime -f .
195+ pip install tskit
150196 python -c "import msprime"
151197 msp simulate 10 tmp.trees
152198 tskit info tmp.trees
153199 tskit provenances tmp.trees
154200
155201
202+ Windows-test :
203+ runs-on : windows-latest
204+ needs : ['Windows']
205+ strategy :
206+ matrix :
207+ python : [3.9, "3.10", 3.11, 3.12, 3.13]
208+ steps :
209+ - name : Download wheels
210+ uses : actions/download-artifact@v4.2.0
211+ with :
212+ name : win-wheel-${{ matrix.python }}
213+ - name : Set up Python ${{ matrix.python }}
214+ uses : actions/setup-python@v5.4.0
215+ with :
216+ python-version : ${{ matrix.python }}
217+ - name : Install wheel and test
218+ run : |
219+ python -VV
220+ pip install numpy newick>=1.3.0 tskit>=0.5.2 demes>=0.2
221+ pip install msprime --no-index --only-binary msprime -f .
222+ python -c "import msprime"
223+ msp simulate 10 tmp.trees
224+ tskit info tmp.trees
225+ tskit provenances tmp.trees
226+
156227 PyPI_Upload :
157- runs-on : ubuntu-latest
228+ runs-on : ubuntu-24.04
158229 environment : release
159- needs : ['OSX-test', 'manylinux-test']
230+ needs : ['OSX-test', 'manylinux-test', 'Windows-test' ]
160231 permissions :
161232 id-token : write
162233 steps :
163234 - name : Download all
164- uses : actions/download-artifact@v4
235+ uses : actions/download-artifact@v4.2.0
165236 - name : Move to dist
166237 run : |
167238 mkdir dist
168239 cp */*.{whl,gz} dist/.
240+ # Windows wheels have different naming pattern
241+ if [ -d "win-wheel"* ]; then cp win-wheel*/*.whl dist/. || true; fi
169242 - name : Publish distribution to Test PyPI
170243 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
171- uses : pypa/gh-action-pypi-publish@release/v1
244+ uses : pypa/gh-action-pypi-publish@v1.12.4
172245 with :
173246 repository_url : https://test.pypi.org/legacy/
174247 - name : Publish distribution to PRODUCTION PyPI
175248 if : github.event_name == 'release'
176- uses : pypa/gh-action-pypi-publish@release/v1
249+ uses : pypa/gh-action-pypi-publish@v1.12.4
0 commit comments