Skip to content

Commit d19c854

Browse files
committed
CI: Fix windows targets
1 parent e63cca4 commit d19c854

1 file changed

Lines changed: 29 additions & 7 deletions

File tree

.github/workflows/rust.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,39 @@ jobs:
3131
- build: win64
3232
os: windows-latest
3333
rust: stable
34+
- build: anaconda win64
35+
os: windows-latest
36+
rust: stable
3437
steps:
3538
- uses: actions/checkout@master
3639
- uses: actions/setup-python@v6
3740
with:
38-
python-version: '3.12'
41+
python-version: '3.14'
3942
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
4043
- name: Install Matplotlib (pip)
4144
run: python3 -m pip install -U matplotlib
4245
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
4346
- name: Setup Miniconda
44-
uses: conda-incubator/setup-miniconda@v3
45-
if: startsWith(matrix.build, 'anaconda macos')
46-
- name: Install Matplotlib (Anaconda)
47-
run: $CONDA/bin/conda install conda-forge::matplotlib
4847
if: startsWith(matrix.build, 'anaconda')
48+
uses: conda-incubator/setup-miniconda@v3.3
49+
with:
50+
channels: conda-forge
51+
miniconda-version: "latest"
52+
- name: Install Matplotlib (Anaconda)
53+
if: ${{ matrix.os != 'windows-latest' && startsWith(matrix.build, 'anaconda') }}
54+
shell: bash -el {0}
55+
run: conda install -y -c conda-forge matplotlib
56+
- name: Install Matplotlib (Anaconda, Windows)
57+
if: ${{ matrix.os == 'windows-latest' && startsWith(matrix.build, 'anaconda') }}
58+
shell: pwsh
59+
run: conda install -y -c conda-forge matplotlib
60+
- name: Diagnose Python used (Windows)
61+
if: ${{ matrix.os == 'windows-latest' }}
62+
shell: pwsh
63+
run: |
64+
python -c "import sys, platform; print(sys.executable); print(sys.version); print(platform.platform())"
65+
python -c "import numpy, matplotlib; print('numpy', numpy.__version__); print('matplotlib', matplotlib.__version__)"
66+
4967
- name: Install Rust ${{ matrix.rust }}
5068
uses: dtolnay/rust-toolchain@stable
5169
with:
@@ -57,10 +75,14 @@ jobs:
5775
- run: cargo run --example a_simple_example
5876
if: ${{ ! startsWith(matrix.build, 'anaconda') }}
5977
- name: Run example with Anaconda
60-
if: startsWith(matrix.build, 'anaconda')
61-
shell: bash
78+
if: ${{ matrix.os != 'windows-latest' && startsWith(matrix.build, 'anaconda') }}
79+
shell: bash -el {0}
6280
run: |
6381
eval "$($CONDA/bin/conda shell.bash activate)"
6482
mkdir -p target/debug/deps
6583
ln -s $CONDA_PREFIX/lib/libpython* target/debug/deps
6684
cargo run --example a_simple_example
85+
- name: Run example with Anaconda (Windows)
86+
if: ${{ matrix.os == 'windows-latest' && startsWith(matrix.build, 'anaconda') }}
87+
shell: pwsh
88+
run: cargo run --example a_simple_example

0 commit comments

Comments
 (0)