Skip to content

Commit 6c98c20

Browse files
committed
Create explicit venv in CI to fix maturin develop on Windows
1 parent dd3cd1b commit 6c98c20

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ jobs:
4141
python-version: ${{ matrix.python-version }}
4242
- uses: dtolnay/rust-toolchain@stable
4343
- uses: Swatinem/rust-cache@v2
44+
- name: create and activate venv
45+
shell: bash
46+
run: |
47+
python -m venv .venv
48+
if [ -d .venv/Scripts ]; then
49+
echo "$GITHUB_WORKSPACE/.venv/Scripts" >> "$GITHUB_PATH"
50+
else
51+
echo "$GITHUB_WORKSPACE/.venv/bin" >> "$GITHUB_PATH"
52+
fi
53+
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> "$GITHUB_ENV"
4454
- name: install build deps
4555
run: pip install maturin pytest numpy scipy matplotlib
4656
- name: maturin develop

0 commit comments

Comments
 (0)