Skip to content

Commit f77d2f6

Browse files
authored
Update cross-platform-build-verification.yml
Signed-off-by: 1minds3t <1minds3t@proton.me>
1 parent 8a7a664 commit f77d2f6

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/cross-platform-build-verification.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,20 @@ jobs:
6464
- name: Build and Test
6565
shell: bash
6666
run: |
67-
# Create a fresh virtual environment to avoid permission errors on self-hosted
68-
python3 -m venv .venv
67+
# Use 'python' if 'python3' isn't available (common on Windows)
68+
if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
6969
70-
# Activate venv (Syntax works for Bash on Mac/Linux/Windows git-bash)
71-
source .venv/bin/activate
70+
# Create venv
71+
$PY -m venv .venv
7272
73+
# Activate venv (Handle Windows 'Scripts' vs Linux/Mac 'bin')
74+
if [ -f ".venv/bin/activate" ]; then
75+
source .venv/bin/activate
76+
else
77+
source .venv/Scripts/activate
78+
fi
79+
80+
# Now run commands inside the verified venv
7381
python -m pip install --upgrade pip build
7482
python -m build
7583
pip install dist/*.whl

0 commit comments

Comments
 (0)