3232 with :
3333 submodules : true
3434
35- - name : Install Conda (needed for GSL)
36- uses : conda-incubator/setup-miniconda@v3.1.1
37- with :
38- activate-environment : anaconda-client-env
39- python-version : ${{ matrix.python }}
40- channels : conda-forge, anaconda
41- channel-priority : strict
42- auto-update-conda : true
4335
4436 - name : Fix windows symlinks
4537 # This is horrible, but the "git config core.symlinks true" didn't work.
@@ -48,36 +40,105 @@ jobs:
4840 rm lwt_interface
4941 cp -r --dereference git-submodules/tskit/python/lwt_interface ./lwt_interface
5042
51- - name : Fix windows .profile
52- if : steps.cache.outputs.cache-hit != 'true' && matrix.os == 'windows-latest'
43+ - name : Install GSL (macOS)
44+ if : matrix.os == 'macos-latest'
45+ run : brew install gsl
46+
47+ - name : Install GSL (Windows)
48+ if : matrix.os == 'windows-latest'
5349 run : |
54- cp ~/.bash_profile ~/.profile
55-
56- - name : Install GSL
57- if : steps.cache.outputs.cache-hit != 'true'
58- shell : bash -l {0} # We need a login shell to get conda
59- run : conda install gsl
50+ vcpkg install gsl:x64-windows
51+ # Add GSL DLL directory to PATH for runtime
52+ $vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
53+ if (-not $vcpkgRoot) { $vcpkgRoot = "C:\vcpkg" }
54+ $gslBinPath = Join-Path $vcpkgRoot "installed\x64-windows\bin"
55+ echo "$gslBinPath" >> $env:GITHUB_PATH
56+ Write-Output "Added to PATH: $gslBinPath"
57+ shell : powershell
58+
59+ - name : Install GSL (Ubuntu)
60+ if : matrix.os == 'ubuntu-24.04'
61+ run : sudo apt-get update && sudo apt-get install -y libgsl-dev
6062
61- - name : Install uv
63+ - name : Install uv and set the python version
6264 uses : astral-sh/setup-uv@v6
6365 with :
66+ python-version : ${{ matrix.python }}
6467 version : " 0.8.15"
6568
6669 - name : Install pip deps
67- shell : bash -l {0}
6870 run : |
71+ uv venv
6972 uv pip install -r pyproject.toml --extra test
7073
7174 - name : Build module
72- env :
73- MSP_CONDA_PREFIX : c:\Miniconda\envs\anaconda-client-env
7475 run : |
75- source ~/.profile
76- conda activate anaconda-client-env
77- python setup.py build_ext --inplace
76+ uv run --no-sync python setup.py build_ext --inplace
77+
78+ - name : Analyze DLL dependencies (Windows)
79+ if : matrix.os == 'windows-latest'
80+ run : |
81+ # First, let's see what files were actually created
82+ Write-Output "=== All .pyd files in directory ==="
83+ Get-ChildItem -Recurse -Name "*.pyd"
84+
85+ Write-Output "=== All files matching *msprime* ==="
86+ Get-ChildItem -Recurse -Name "*msprime*"
87+
88+ Write-Output "=== Contents of msprime directory ==="
89+ if (Test-Path "msprime") {
90+ Get-ChildItem "msprime" -Name
91+ } else {
92+ Write-Output "msprime directory not found"
93+ }
94+
95+ # Find the built extension - try multiple patterns
96+ $extension = Get-ChildItem -Recurse -Name "*.pyd" | Where-Object { $_ -like "*msprime*" } | Select-Object -First 1
97+ Write-Output "Found extension: $extension"
98+
99+ if ($extension) {
100+ # Get full path
101+ $extensionPath = Get-ChildItem -Recurse "*.pyd" | Where-Object { $_.Name -like "*msprime*" } | Select-Object -First 1 -ExpandProperty FullName
102+ Write-Output "Extension full path: $extensionPath"
103+
104+ # Download Dependency Walker
105+ Write-Output "=== Downloading Dependency Walker ==="
106+ Invoke-WebRequest -Uri "http://www.dependencywalker.com/depends22_x64.zip" -OutFile "depends.zip"
107+ Expand-Archive depends.zip -DestinationPath "depends"
108+
109+ # Run dependency walker
110+ Write-Output "=== Running Dependency Walker ==="
111+ .\depends\depends.exe /c /f:1 /ot:deps.txt "$extensionPath"
112+ Start-Sleep -Seconds 5 # Give it time to complete
113+
114+ # Output the full dependency analysis
115+ if (Test-Path "deps.txt") {
116+ Write-Output "=== Dependency Walker Analysis ==="
117+ Get-Content deps.txt
118+ Write-Output "=== End Analysis ==="
119+ } else {
120+ Write-Output "deps.txt not created - Dependency Walker may have failed"
121+ Write-Output "=== Simple Import Test ==="
122+ python -c "import msprime._msprime; print('SUCCESS')" 2>&1 || Write-Output "Import failed"
123+ }
124+
125+ # Check if GSL DLLs are in PATH
126+ Write-Output "=== GSL DLL Check ==="
127+ $env:PATH.Split(';') | ForEach-Object {
128+ $dir = $_.Trim()
129+ if ($dir -and (Test-Path $dir)) {
130+ $gslDlls = Get-ChildItem -Path $dir -Name "gsl*.dll" -ErrorAction SilentlyContinue
131+ if ($gslDlls) {
132+ Write-Output "Found GSL DLLs in ${dir}:"
133+ $gslDlls | ForEach-Object { Write-Output " $_" }
134+ }
135+ }
136+ }
137+ } else {
138+ Write-Output "ERROR: Could not find any msprime extension"
139+ }
140+ shell : powershell
78141
79142 - name : Run tests
80143 run : |
81- source ~/.profile
82- conda activate anaconda-client-env
83- pytest -xvs -n0
144+ uv run --no-sync pytest -xvs -n0
0 commit comments