Skip to content

Commit bf64f57

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

1 file changed

Lines changed: 52 additions & 16 deletions

File tree

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

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,60 @@ jobs:
5252
PYTHONUNBUFFERED: "1"
5353
run: |
5454
set -x
55-
if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
5655
57-
# ROBUST VENV: Bypasses broken system pip on self-hosted runners
58-
if ! $PY -m venv .venv; then
59-
echo "⚠️ Standard venv failed. Retrying with --without-pip..."
60-
$PY -m venv .venv --without-pip
61-
curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python
62-
fi
63-
64-
if [ -f ".venv/bin/activate" ]; then source .venv/bin/activate; else source .venv/Scripts/activate; fi
65-
66-
python -m pip install --upgrade pip build
67-
python -m build
68-
pip install dist/*.whl
56+
# LINUX SELF-HOSTED: Use working diagnostic approach
57+
if [[ "${{ matrix.runner }}" == *"self-hosted"* ]] && [[ "${{ matrix.runner }}" == *"linux"* ]]; then
58+
if [ -f "$HOME/miniconda3/envs/evocoder_env/bin/python3.11" ]; then
59+
PY="$HOME/miniconda3/envs/evocoder_env/bin/python3.11"
60+
elif [ -f "/usr/bin/python3.11" ]; then
61+
PY=/usr/bin/python3.11
62+
elif [ -f "/usr/bin/python3.12" ]; then
63+
PY=/usr/bin/python3.12
64+
else
65+
echo "❌ No suitable Python found"
66+
exit 1
67+
fi
68+
69+
$PY --version
70+
71+
echo "🔥 Installing pip and build"
72+
$PY -m pip install --user --upgrade pip build || {
73+
curl -sS https://bootstrap.pypa.io/get-pip.py | $PY - --user
74+
$PY -m pip install --user --upgrade pip build
75+
}
76+
77+
echo "Building package..."
78+
$PY -m build
79+
80+
echo "Installing package..."
81+
$PY -m pip install --user --force-reinstall dist/*.whl
82+
83+
echo "Testing installation..."
84+
export PATH="$HOME/.local/bin:$PATH"
85+
omnipkg --version
86+
8pkg --version
87+
omnipkg list
6988
70-
omnipkg --version
71-
8pkg --version
72-
omnipkg list
89+
# ALL OTHER PLATFORMS: Use venv approach
90+
else
91+
if command -v python3 &>/dev/null; then PY=python3; else PY=python; fi
92+
93+
if ! $PY -m venv .venv; then
94+
echo "⚠️ Standard venv failed. Retrying with --without-pip..."
95+
$PY -m venv .venv --without-pip
96+
curl -sS https://bootstrap.pypa.io/get-pip.py | .venv/bin/python
97+
fi
98+
99+
if [ -f ".venv/bin/activate" ]; then source .venv/bin/activate; else source .venv/Scripts/activate; fi
100+
101+
python -m pip install --upgrade pip build
102+
python -m build
103+
pip install dist/*.whl
104+
105+
omnipkg --version
106+
8pkg --version
107+
omnipkg list
108+
fi
73109
74110
# ═══════════════════════════════════════════════════════════════════
75111
# 2. CRITICAL TESTS

0 commit comments

Comments
 (0)